Skip to content

Commit

Permalink
fix source inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Apr 5, 2018
1 parent 7e674e0 commit c2ce2ef
Show file tree
Hide file tree
Showing 6 changed files with 239 additions and 222 deletions.
2 changes: 0 additions & 2 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -2612,8 +2612,6 @@ class Player extends Component {
}

if (!titleCaseEquals(sourceTech.tech, this.techName_)) {
this.changingSrc_ = true;

// load this technology with the chosen source
this.loadTech_(sourceTech.tech, sourceTech.source);
return false;
Expand Down
12 changes: 8 additions & 4 deletions src/js/tech/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ class Html5 extends Tech {
constructor(options, ready) {
super(options, ready);

if (options.enableSourceset) {
this.setupSourcesetHandling_();
}

const source = options.source;
let crossoriginTracks = false;

Expand All @@ -52,6 +48,11 @@ class Html5 extends Tech {
this.handleLateInit_(this.el_);
}

// setup sourceset after late sourceset/init
if (options.enableSourceset) {
this.setupSourcesetHandling_();
}

if (this.el_.hasChildNodes()) {

const nodes = this.el_.childNodes;
Expand Down Expand Up @@ -117,6 +118,9 @@ class Html5 extends Tech {
* Dispose of `HTML5` media element and remove all tracks.
*/
dispose() {
if (this.el_.resetSourceset_) {
this.el_.resetSourceset_();
}
Html5.disposeMediaElement(this.el_);
this.options_ = null;

Expand Down
Loading

0 comments on commit c2ce2ef

Please sign in to comment.