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 committed Jan 31, 2024
1 parent acf1977 commit cac1fd0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/player.js
Expand Up @@ -1795,8 +1795,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(this.video_);
Expand Down

0 comments on commit cac1fd0

Please sign in to comment.