* Load Steering Manifest
* Make UA check lazy for legacy unsupported MP3 in MP4 container check
* Add Redundant Streams tests
* Add FRAME-RATE to Redundant Stream group key and level sorting
Optimize MANIFEST_PARSED level filtering
Optimize Media Playlist check
* Do not group Variant levels with PATHWAY-ID into Fallback Stream URLs (unless building without Content Steering support)
Store and return seperate LevelAttributes per Fallback Stream URL
Align Level audio and text group ids with Fallback Stream URLs (Level._urlId)
* Content Steering Pathway grouping and selection
#5074
* Support removeLevel and improve capLevelController with level index changes
* Pathway Clone Variants
* Pathway Clone Rendition Groups
* Fix audio track alignment with timescales that differ and smooth switch when attributes do not change
* Always emit LEVEL_SWITCHING on Pathway change to ensure audio and subtitle tracks update as well
* Fix unregister listeners in fps and latency controller
* Unit test clean up
* Update README for Content Steering
Per conversation in #3457 this commit adds a backBufferLength
configuration to set the backbuffer constraint for both live
and VOD content.
The original liveBackBufferLength config property has been
deprecated and defaults to null, but is still supported
for live content.
* 'master' of github.com:video-dev/hls.js: (68 commits)
Bump mocha from 7.2.0 to 8.0.1
Bump eslint-plugin-import from 2.20.2 to 2.21.2
Fix level-controller altAudio and audioCodecFound determination and update unit tests
Fix switching between main audio-only in stream-controller and alt audio tracks #2706
Support playback and audio track switching of audio-only stream with main audio and alt audio
[Security] Bump websocket-extensions from 0.1.3 to 0.1.4
Bump netlify-cli from 2.52.0 to 2.53.0
Bump typescript from 3.9.3 to 3.9.5
Move hosting of "MP3 VOD demo" to fix failing tests
Improve findFragmentByPTS and fragmentWithinToleranceTest with regards to selecting the next fragment and handling of tiny fragments Fixes#2776
Bump @babel/core from 7.10.1 to 7.10.2
Bump @babel/preset-env from 7.10.1 to 7.10.2
Bump url-toolkit from 2.1.6 to 2.2.0
Bump @babel/helper-module-imports from 7.8.3 to 7.10.1
Bump @babel/plugin-proposal-object-rest-spread from 7.9.6 to 7.10.1
Bump @babel/plugin-proposal-optional-chaining from 7.9.0 to 7.10.1
Bump @babel/register from 7.9.0 to 7.10.1
Bump netlify-cli from 2.51.0 to 2.52.0
Bump @babel/plugin-transform-object-assign from 7.8.3 to 7.10.1
Bump karma-coverage-istanbul-reporter from 3.0.2 to 3.0.3
...
* Refactor buffer-controller to execute all sourceBuffer actions as enqueued operations
These changes ensure that Hls.js is able to ensure order of SB operations, as well as prevent progressive appends from deadlocking other operations
JW8-8934
Thank you to Tom Jenkinson for acting as a reviewer for this work, including writing some suggestions via the GitHub PR github.com/video-dev/hls.js/pull/2073. The commit history has been squashed as it was a fairly lengthly process to get everything working to support the conversion to TypeScript.
Early in the history of this commit, we converted properties to be initialized to `null`. This was incorrect, as it changes the behaviour of code that uses `Object.keys` calls to check if an object has any keys on it. Before, they would be empty, but if the properties are set to null, this check is no longer valid and it changes the behaviour. This is something to look out for in the future of other conversions, as the values themselves are often times reset to the `null`, but begin as undefined.
Added a common `types` folder for interfaces where the ownership of the type wasn't clear for the individual file. The default no-op logger which is the inferred usage did not have any arguments in it's method signature. By adding an argument, TypeScript is able to infer the correct interface. As well the Karma and Webpack configuration had to be updated to enable building TypeScript, and getting testing coverage information from Istanbul.
Define lib "es2015" and "dom" to add HTMLMediaElement, SourceBuffer and Number.isFinite definitions to the TypeScript binary when it is doing type-checking.
When attempting to lint the older version of `typescript-eslint-parser` would emit `no-undef` errors for TypeScript interfaces. Updating the package fixes this issue.
Tom pointed out that we should not use global module declarations to extend default HTML types since users will eventually be importing *.d.ts files from the hls.js project and this would also extend their types. Due to this feedback switched to defining a module local type `ExtendedSourceBuffer`. Which instead extends with the `ended` prop.
Event Handlers were set to be part of the private scope. While this has no effect now, it will be important to ensure other modules do not directly invoke the event handlers. Other methods that were prefixed with a `_` were also set into the private scope.
Where possible, code was switched to early-exit to lower the cognitive load in conditional statements, an example of this was the doAppend method. Another cleanup statement was switching handling of error codes and the comments to be closer to the conditional to which they applied.
Switched to using the Record<Key, Value> type to help support access via the index signature [key: T] syntax in the future.
An issue that was fixed in this commit was that The controller previous exposed the local `pendingTracks` property through the event and did not set the buffer on `this.tracks` instead opting to set it on the individual track, which bubbled up to the pendingTracks object, whose reference was lost in the buffer-controller module. This commit changes this behaviour so that the controller publishes `tracks` from the public variable on the controller rather than the pendingTracks which are passed into createSourceBuffers. This also means that this fixes the `.buffer.buffered` being undefined on the demo page. Added unit tests to cover the new behaviour of throwing an error if createSourceBuffer is called without an attached media element.
* Determine presence of video in a manifest based on number of levels instead of videoCodecFound
* Rework sourceBuffer count estimation to accurately refelct whether a playlist contains altAudio
* Refactor code to better reflect how BUFFER_CODEC events and pending tracks are related