Skip to content

Commit

Permalink
Close GH-887: Fix to reuse HTML5 tech (2). Fixes #884
Browse files Browse the repository at this point in the history
  • Loading branch information
eXon authored and heff committed Dec 11, 2013
1 parent 7b23576 commit 6b73df9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 6b73df9

Please sign in to comment.