Skip to content

Commit

Permalink
fix keyStatusMap
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 committed Dec 8, 2023
1 parent 69da347 commit 7d21d53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dash-playlist-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export default class DashPlaylistLoader extends EventTarget {
this.vhs_ = vhs;
this.withCredentials = withCredentials;
this.addMetadataToTextTrack = options.addMetadataToTextTrack;
this.keyStatusMap = new Map();
this.keyStatusMap_ = new Map();

if (!srcUrlOrPlaylist) {
throw new Error('A non-empty playlist URL or object is required');
Expand Down Expand Up @@ -474,7 +474,7 @@ export default class DashPlaylistLoader extends EventTarget {
}

this.off();
this.keyStatusMap.clear();
this.keyStatusMap_.clear();
}

hasPendingRequest() {
Expand Down Expand Up @@ -935,7 +935,7 @@ export default class DashPlaylistLoader extends EventTarget {
return;

Check warning on line 935 in src/dash-playlist-loader.js

View check run for this annotation

Codecov / codecov/patch

src/dash-playlist-loader.js#L931-L935

Added lines #L931 - L935 were not covered by tests
}
const playlistKID = playlist.contentProtection.mp4protection.attributes['cenc:default_KID'].replace('-', '');
const hasUsableKeystatus = this.keyStatusMap.has(playlistKID) && this.keyStatusMap.get(playlistKID) === 'usable';
const hasUsableKeystatus = this.keyStatusMap_.has(playlistKID) && this.keyStatusMap_.get(playlistKID) === 'usable';

Check warning on line 938 in src/dash-playlist-loader.js

View check run for this annotation

Codecov / codecov/patch

src/dash-playlist-loader.js#L937-L938

Added lines #L937 - L938 were not covered by tests

if (!hasUsableKeystatus) {
playlist.excludeUntil = Infinity;
Expand Down

0 comments on commit 7d21d53

Please sign in to comment.