Skip to content

Commit

Permalink
fix: pick variant track from streaming event
Browse files Browse the repository at this point in the history
allowed user to pick variant track from streaming event
  • Loading branch information
kocoten1992 authored Jun 9, 2021
1 parent 9674e1c commit b973ee2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -4912,6 +4912,14 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
* @private
*/
chooseVariant_() {
for (const variantTrack of this.getVariantTracks()) {
if (! variantTrack.active) {
continue;
}

return this.manifest_.variants[variantTrack.id];
}

if (this.updateAbrManagerVariants_()) {
return this.abrManager_.chooseVariant();
} else {
Expand Down

0 comments on commit b973ee2

Please sign in to comment.