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

Add compatibility with videojs 4.6 #4

Closed
triwav opened this Issue Jul 29, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@triwav

triwav commented Jul 29, 2014

Updating to version 4.6 causes an issue when you try to resume playback locally in Chrome. The issue is in
vjs.ChromeCastComponent.prototype.onStopAppSuccess. I think the issue is this gets run:
this.player_.src(this.player_.options_['sources']);
and in 4.6 the player now resets when you change the source
videojs/video.js#1124

The below code solves this but is not the correct way to do it. The key here is running load() to get it to reload the file locally.

// Fix for 4.6 not working correctly otherwise
this.player_.load();

var context = this;
setTimeout(function(){
if (context.apiMedia.playerState == "IDLE") {
    context.player_.currentTime(0);
    context.player_.onPause();
} else {

    if (!this.paused) {
        context.player_.play();
    }
    context.player_.currentTime(context.currentMediaTime);
}
this.apiMedia = null;
},500);
@triwav

This comment has been minimized.

Show comment
Hide comment
@triwav

triwav Aug 12, 2014

This appears the to be the cause of the issue:
videojs/video.js#1389

Implementing the isready = false solves this issue.

triwav commented Aug 12, 2014

This appears the to be the cause of the issue:
videojs/video.js#1389

Implementing the isready = false solves this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment