Open kontrollanten opened 11 months ago
Comment from izkmdz:
Unfortunately, this fix for https://github.com/silvermine/videojs-chromecast/issues/103 is causing the seek bar to not be as responsive as before. Also, the delay does not allow for quick mouse clicks/taps to be registered on the seek bar.
I think i was able to fix the issue by adding the check for this.videojsPlayer.scrubbing()
in pause method, like this:
pause: function() {
// Do not pause while scrubbing or else chromecast will stop timeupdate events
if (!this.paused() && this._remotePlayer.canPause && !this.videojsPlayer.scrubbing()) {
this._remotePlayerController.playOrPause();
}
}
Interesting. Is it necessary to check for !this.paused()
and then call this._remotePlayerController.playOrPause()
? Sounds like it should be enough to remove the this.paused check and then just call this._remotePlayerController.pause()
?
I just left this part as it was before, didn't check, but i think playOrPause
is used because there is no pause method
https://developers.google.com/cast/docs/reference/web_sender/cast.framework.RemotePlayerController#playOrPause
In the latest video.js version this fix is not working, scrubbing(true) is not being set on single clicks on seek bar anymore. Not sure how to fix it differently, i've just patched scrubbing(true) back into video.js in SeekBar handleMouseDown function
In the latest video.js version this fix is not working, scrubbing(true) is not being set on single clicks on seek bar anymore. Not sure how to fix it differently, i've just patched scrubbing(true) back into video.js in SeekBar handleMouseDown function
The latest PR should work with latest video.js as well. It's not 100% working and the solution is not perfect though. I've been sitting in days and trying to figure out why chromecast stops sending time_update events upon scrubbing HLS, but can't find the core issue.
Known issues:
@izkmdz Should we put the functionality in this PR under a specific tech option since it's not perfect? For HLS users it's still a great step forward compared to how it works today.
Proposal:
const videojsOptions = {
fluid: true,
techOrder: [ 'chromecast', 'html5' ],
plugins: {
chromecast: {
enableExperimentalHlsSeekSupport: true,
},
},
};
@RavWar @ayrtonbrut Can you this PR and see if it solves your issues?
I've created a demo with HLS in https://github.com/silvermine/videojs-chromecast/pull/166 which you can use if you'd like to.
With the new PR changes original issue is fixed for me, couldn't thoroughly test if it causes any other problems though
With the new PR changes original issue is fixed for me, couldn't thoroughly test if it causes any other problems though
Great, thanks for testing.
Authored by @andreasgangso some years ago.
As far as I remember the first commit solved some general issue where an error was thrown due to "tech.seeking is not defined".
The seeking/scrubbing issue is described in #103.