Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync fails some times #22

Open
Flova opened this issue Apr 29, 2020 · 3 comments · May be fixed by #122
Open

Sync fails some times #22

Flova opened this issue Apr 29, 2020 · 3 comments · May be fixed by #122
Labels
bug Something isn't working frontend
Milestone

Comments

@Flova
Copy link
Member

Flova commented Apr 29, 2020

No description provided.

@Flova Flova added the bug Something isn't working label Apr 30, 2020
@Flova
Copy link
Member Author

Flova commented Jun 9, 2020

Bug description

Youtube

  • Open two clients with a youtube video
  • Start the Video on the first one
  • The scond one needs an interaction (autoplay block), so you also click start
  • Both play in sync
  • Stop the second player
  • Both stop
  • Start the second player
  • Only the second player starts, the first one ist still paused
  • If you start/stop any player one more time the problem is fixed and does not occure anymore
    A bit of debugging shows that the second player is falsely in the "Skip next play" state after starting the video. This results in an skip of the next play as it is observed. My assumtion is that some things went wrong with the "state skiping" initalisation if the player is the second one.

L2G

  • Open two clients with a lecture2go video
  • Start the Video on the first one
  • The scond one needs an interaction (autoplay block), so you also click start
  • Both play in sync
  • Stop the second player
  • Only the second player stops, the first one ist still paused
  • If you start/stop any player one more time the problem is fixed and does not occure anymore
    A bit of debugging shows that the second player is falsely in the "Skip next pause" state after starting the video. This results in an skip of the next pause as it is observed. My assumtion is that some things went wrong with the "state skiping" initalisation if the player is the second one.

@Flova Flova added this to the v1.0 milestone Jul 1, 2020
@vesper8
Copy link

vesper8 commented Oct 18, 2020

Hi @Flova

Cool project! I'm interested in it as I'm working on something similar but more related to music.

I noticed quite a few sync issues, most of which are mentioned in this issue here. I also thought that there is no way around needing the 2nd client to start the video because it needs user interaction.

However I was a bit surprised to find a similar project to yours here https://github.com/ubclaunchpad/sync that doesn't have these issues

If you try their demo here: https://sync.ubclaunchpad.com

Create a room, paste a youtube video, then open that room url in a 2nd browser.. you'll see that starting the video on the 1st screen effectively starts it on the 2nd as well. And that pausing on the 2nd also pauses on the first.

So somehow they've found a way around the problems described in this issue. Maybe it can help you bring this solution to your project too : )

Cheers!

@Flova
Copy link
Member Author

Flova commented Oct 18, 2020

Hi @vesper8

Thanks for the feedback and the infos. Also thanks for sharing the other project with us.

There is indeed a user interaction needed for the second client. But the problem described in this issue seems related to the video javascript library video.js. It does not distinguish between a manual interaction and an interaction via api therefore we need to stop listening while setting a state in the api. Otherwise, this state change gets published again by video.js as user interaction and we have an endless loop between the clients. To prohibit this behavior we drop user inputs occurring shortly after an incoming state change. Sadly this is a bit hacky and somehow sometimes a bit broken (the real user interaction gets blocked long after a state change). We definitely have a look, which library is used in the project you shared with us.

Cheers!

@Flova Flova linked a pull request Feb 22, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants