Update README.md
Describe the goals of the adaptive switching algorithm, instead of the implementation details.
Showing
1 changed file
with
16 additions
and
16 deletions
... | @@ -177,22 +177,22 @@ configured. Easy [instructions are | ... | @@ -177,22 +177,22 @@ configured. Easy [instructions are |
177 | available](http://enable-cors.org/server.html) for popular webservers | 177 | available](http://enable-cors.org/server.html) for popular webservers |
178 | and most CDNs should have no trouble turning CORS on for your account. | 178 | and most CDNs should have no trouble turning CORS on for your account. |
179 | 179 | ||
180 | ## MBR Rendition Selection Logic | 180 | ## Adaptive Switching Behavior |
181 | In situations where manifests have multiple renditions, the player will | 181 | The HLS tech tries to ensure the highest-quality viewing experience |
182 | go through the following algorithm to determine the best rendition by | 182 | possible, given the available bandwidth and encodings. This doesn't |
183 | bandwidth and viewport dimensions. | 183 | always mean using the highest-bitrate rendition available-- if the player |
184 | 184 | is 300px by 150px, it would be a big waste of bandwidth to download a 4k | |
185 | - Start on index 0 as defined in the HLS Spec (link above) | 185 | stream. By default, the player attempts to load the highest-bitrate |
186 | - On a successful load complete per segment determine the following; | 186 | variant that is less than the most recently detected segment bandwidth, |
187 | - player.hls.bandwidth set to value as segment byte size over download time | 187 | with one condition: if there are multiple variants with dimensions greater |
188 | - Viewport width/height as determined by player.width()/player.height() | 188 | than the current player size, it will only switch up one size greater |
189 | - Playlists mapped and sorted by BANDWIDTH less than or equal to 1.1x player.hls.bandwidth | 189 | than the current player size. |
190 | - Best playlist variant by BANDWIDTH determined | 190 | |
191 | - Subset of bandwidth appropriate renditions mapped | 191 | If you'd like your player to use a different set of priorities, it's |
192 | - Subset validated for RESOLUTION attributes less than or equal to player dimensions | 192 | possible to completely replace the rendition selection logic. For |
193 | - Best playlist variant by RESOLUTION determined | 193 | instance, you could always choose the most appropriate rendition by |
194 | - Result is as follows; | 194 | resolution, even though this might mean more stalls during playback. |
195 | - [Best RESOLUTION variant] OR [Best BANDWIDTH variant] OR [inital playlist in manifest] | 195 | See the documentation on `player.hls.selectPlaylist` for more details. |
196 | 196 | ||
197 | ## Release History | 197 | ## Release History |
198 | - 0.9.0: support segment level AES-128 encryption | 198 | - 0.9.0: support segment level AES-128 encryption | ... | ... |
-
Please register or sign in to post a comment