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

Fix to reuse HTML5 tech (2) #887

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/js/media/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ vjs.Html5 = vjs.MediaTechController.extend({
this.features['fullscreenResize'] = true;

vjs.MediaTechController.call(this, player, options, ready);
this.setupTriggers();

var source = options['source'];

Expand Down Expand Up @@ -54,7 +55,6 @@ vjs.Html5 = vjs.MediaTechController.extend({
}
});

this.setupTriggers();
this.triggerReady();
}
});
Expand Down
6 changes: 3 additions & 3 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ vjs.Player.prototype.loadTech = function(techName, source){
// Pause and remove current playback technology
if (this.tech) {
this.unloadTech();
}

// if this is the first time loading, HTML5 tag will exist but won't be initialized
// so we need to remove it if we're not loading HTML5
} else if (techName !== 'Html5' && this.tag) {
// get rid of the HTML5 video tag as soon as we are using another tech
if (techName !== 'Html5' && this.tag) {
vjs.Html5.disposeMediaElement(this.tag);
this.tag = null;
}
Expand Down