Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Nov 19, 2020
1 parent c3c2bb3 commit 82828d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/dash-playlist-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ export default class DashPlaylistLoader extends EventTarget {
done();
});
}

haveMaster_(masterChanged = true) {
this.state = 'HAVE_MASTER';
if (this.isMaster_) {
Expand Down Expand Up @@ -652,15 +653,15 @@ export default class DashPlaylistLoader extends EventTarget {
if (this.masterPlaylistLoader_.master) {
newMaster = updateMaster(
this.masterPlaylistLoader_.master,
newMaster, this.masterPlaylistLoader_.sidxMapping_
newMaster,
this.masterPlaylistLoader_.sidxMapping_
);
}

// only update master, if we have a new master.
// only update master if we have a new master
this.masterPlaylistLoader_.master = newMaster ? newMaster : this.masterPlaylistLoader_.master;
const location = this.masterPlaylistLoader_.master.locations && this.masterPlaylistLoader_.master.locations[0];

// if locations isn't set or is an empty array, exit early
if (location && location !== this.masterPlaylistLoader_.srcUrl) {
this.masterPlaylistLoader_.srcUrl = location;
}
Expand Down

0 comments on commit 82828d7

Please sign in to comment.