calzoneman / sync

Node.JS Server and JavaScript/HTML Client for synchronizing online media
Other
1.45k stars 235 forks source link

YouTube autoplays during pause buffer #915

Closed calzoneman closed 2 years ago

calzoneman commented 3 years ago

Player code has a lead-in time during which the video is started and immediately paused, then unpaused once the server timer hits 0 seconds (this was to allow buffering).

Evidently this is not working for YouTube anymore; it is just playing the video and then looping back. The code does seem to have a YouTube-specific workaround, so maybe that changed again, or maybe it's worth just getting rid of the lead-in entirely since buffering is not as much of an issue these days as it was when CyTube was built.

calzoneman commented 3 years ago

It appears the pauseSeekRaceCondition flag is only set from the mediaUpdate handler, not when the player is first initialized, which means that it should be working whenever the transition is from youtube -> youtube, and only cause this problem when a different player type is replaced by a YouTube player.

calzoneman commented 3 years ago

One user has reported that this can happen even on consecutive YouTube videos, but I can't reproduce that.

calzoneman commented 2 years ago

Closing as not reproducible.