Add "highestEfficiency" initial track selection mode
Created by: chromakode
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 https://github.com/Dash-Industry-Forum/dash.js/issues/3022#issuecomment-509937141). 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: https://github.com/Dash-Industry-Forum/dash.js/issues/3022