Propose RC1 v1.5.2
Created by: LloydW93
(This time with the right head fork!)
This PR includes most of the changes that the BBC has made to dash.js 1.5.1 in the version it is currently using for its HTML5 player trials. As such, it's only mostly been tested with BBC streams and we'd welcome further feedback. Next week we'll run a set of sanity checks here on various OS/Browser/Device combinations to check that we haven't broken anything new.
Features:
Added set/getMaxAllowedRepresentationRatio and setInitialRepresentationRatio APIs, which enable you to select a starting and maximum representation part way through the available list, enabling limitations of control without knowledge of available bitrates. With 10 representations, and a maxAllowedRepresentationRatio of 0.3, the third representation is the highest that will be switched to. By default, this has no effect. New ABR heuristic that prevents switching to representations larger than the size of the viewport. There are corresponding get/setLimitBitrateByPortal APIs to control this functionality. When a stream is stalled with addStalledStream (i.e. for rebuffering), a "waiting" event is sent by the video model. Inversely, a "playing" event is sent when all stalled streams have been removed. This enables easy tracking of whether or not the video is rebuffering. New astinfuture event that is triggered when playback will not start yet as the stream is not yet available. New get/setAutoSwitchQualityFor APIs that enable you to toggle ABR for just audio or video. get/setAutoSwitchQuality exists for backwards compatibility. DVB-compliant metric reporting. Fixes:
Improvements to handling resets, and replacement of lots of logic around scheduling and other calculations that seems to exist for dealing with badly generated content. Removal of unused long.js/Math.js (cherry-picked from development branch). Adds an isDiscarded check to isFragmentLoadedOrPending, as an additional layer of protection for issue #240 (closed). Fixes/workarounds for #881 (closed), #882 (closed) and #883 (closed). Improved buffer pruning logic that works across buffered ranges. Fix playback in environments where no EME are available (e.g. Debian Firefox)