Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "highestEfficiency" initial track selection mode #3498

Conversation

chromakode
Copy link
Contributor

This PR adds a new initial track selection mode: "highestEfficiency". It picks the variant that offers the lowest bitrate for equivalent resolution (similar to the Shaka Player behavior referenced by @japettyjohn in #3022 (comment)). Similar to Shaka Player, this will prefer VP9 over MP4 if it's offered with a lower average bitrate, which is the behavior I was looking for.

In addition, this PR exposes selectInitialTrack and the getTracksWithHighestBitrate/etc functions on the class factory so that they can be overridden using MediaPlayer.extend, to allow end users to define their own custom strategy.

Included are new tests to cover the new track selection mode as well as the other existing ones.

Re: #3022

@dsilhavy dsilhavy self-requested a review January 6, 2021 06:28
@dsilhavy dsilhavy added this to the 3.2.1 milestone Jan 6, 2021
@dsilhavy
Copy link
Collaborator

dsilhavy commented Jan 7, 2021

This looks very good, only had one minor question. We can merge this afterwards

@dsilhavy dsilhavy merged commit 9d91e39 into Dash-Industry-Forum:development Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants