Skip to content

Commit

Permalink
fix: Prevent license requests for unplayable variants (#6204)
Browse files Browse the repository at this point in the history
Fixes #3429
  • Loading branch information
avelad authored and joeyparrish committed Feb 17, 2024
1 parent 2c34143 commit 725391a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -2023,8 +2023,17 @@ shaka.Player = class extends shaka.util.FakeEventTarget {

this.drmEngine_.configure(this.config_.drm);

const tracksChanged = shaka.util.StreamUtils.applyRestrictions(
this.manifest_.variants, this.config_.restrictions, this.maxHwRes_);
if (tracksChanged && this.streamingEngine_) {
this.onTracksChanged_();
}

const playableVariants = shaka.util.StreamUtils.getPlayableVariants(
this.manifest_.variants);

await this.drmEngine_.initForPlayback(
this.manifest_.variants,
playableVariants,
this.manifest_.offlineSessionIds);

await this.drmEngine_.attach(has.mediaElement);
Expand Down

0 comments on commit 725391a

Please sign in to comment.