Source Selection for Web Player
Updated: Tue Jul 30 02:08:55 2019, By Contribute to this page
Let us assume that the following player configuration is given and we would like to apply source selection logic.
- The player looks at the
streamPriority
array and see that thedash
stream has the highest priority. - The player will check whether it received any
dash
sources within thesources
object. - Since there are no
dash
sources in it, the player will move to the next priority from thestreamPriority
list which ishls
. - After checking the
sources
object again and foundhls
sources, the player will choose to playhls
.
However, will the player use the native HLS or not? This depends on the preferNative
value for hls
. Because this value is set to true
, the player knows that if the browser supports native hls
playback, the source will be played natively.
Given the configuration information above, which source will be played in each browser?
Following summarize the results for this scenario:
Chrome | Safari | Firefox | Edge |
---|---|---|---|
HLS with hls.js |
native HLS | HLS with hls.js |
native HLS |