* Do not enable subtitle options with AUTOSELECT=YES attribute
* Update and add initial selection tests for subtitle-controller
* Only pick forced subtitle option if it is the only one
Add default field to audio and subtitle selection options and forced field to subtitle selection option
* Address TextTrack change event overriding subtitle preference
Fix _TRACKS_UPDATED and _TRACK_SWITCH event order when preference is selected
* Do not auto select subtitle options with FORCED=YES attribute
* refactor CMCD controller and test to use common media library
* update build script to transpile the @svta package
* add ability to specify cmcd keys
* Use Content Steering Pathways to manage Redundant Streams and resolve their errors
* Ensure correct Pathway penalization on Playlist loading errors
* Do not reload Content Steering manifest while media is ended or detached
* Use subtitle track name and language to find and match subtitle/captions TextTrack rather than subtitleTrack index
Resolves#4571
* Fix regression in dev where AUDIO_TRACKS_UPDATED is re-dispatched with zero tracks
Allow selection of audioTrack on AUDIO_TRACKS_UPDATED (overriding default selection - Resolves#5831)
Cleanup selection of subtitleTrack on SUBTITLE_TRACKS_UPDATED (overriding default selection)
* Fix TextTrack use with ASSOC-LANGUAGE
Match the initial default/forced/autoselect choice made when playing HLS in Safari
* Make initial variant selection based on preferred codec rather than the first variant in the multivariant playlist
* Fix `minAutoLevel` and `ttfb` usage in abandon rules check
* Fix filtering of invalid video-ranges
* Log reason for ignoring start candidates with a particular codec
* Add rendition helper and move SCORE logic into getStartCodecTier
* Add support for MediaCapabilities video configuration filtering
FIxes#5707
* Add support for MediaCapabilities audio configuration filtering
Related to #5704 and #4072
* Add __USE_MEDIA_CAPABILITIES__ build const to remove MediaCapabilities checks from light build
* MediaCapabilities: Assume a framerate of 30fps since decodingInfo will throw with Level default of 0.
* Select variant with alternate video codec on video append error
* Use complete media-parsed codec name when determining if changeType should be appended
* Add `firstAutoLevel` to API.md
* Error and switch on SourceBuffer append requests for non-existing tracks
(muxed "audiovideo" append over unmuxed "video" and "audio" SourceBuffer)
Related to #1510
* Handle queued appends for pending source buffers
* Fire STEERING_MANIFEST_LOADED event when loading a Content Steering Manifest
* Use steeringManifest instead of response inside STEERING_MANIFEST_LOADED content
* Fire STEERING_MANIFEST_LOADED between clonePathways and updatePathwayPriority
* Fix Low-Latency part and fragment tracking regression introduced in #5102
* Fix issues with reuse of player instance when loading additional assets
Fixes#5425
* Reset SourceBuffers in `loadSource()` when the asset URL has changed, or buffer-controller setup has begun
* Remove old parts from the fragment tracker on frag buffered
* Remove old parts from the fragment tracker on frag buffered
* Reset eme-controller key format promise on manifest loading
* Only allow large gaps to be skipped if start gap or all fragments in range are partial
Fixes#5360
* Fix adaptation and fragment tracking after fragment errors (gap tags)
#2940
* Relax TTFB timeout on manifest request
(Add support for LoadPolicy `maxTimeToFirstByteMs` of Infinity and similarly ignore value of 0)
* Add LoadPolicy API documentation
* Convert build packager to rollup
* Add an es module target (#2910)
* UMD build worker injection (#5107)
* Add ES5 syntax check for UMD builds (#5301, #5288)
* Add common rollup config
* handle `self` not existing (happens in nodejs. The check that makes sure the dist file can be required in node and not throw was failing because of this.)
* Disable coverage in CI
* Add `config.workerPath` option and "hls.worker.js" build output (#5107)
* Include transmuxer-interface id ("main" and "audio") in Web Worker setup and error logs
Co-authored-by: Tom Jenkinson <tom@tjenkinson.me>
* Handle fragments and parts with a GAP tag/attribute
* Improve GAP fragment picking, post gap buffering, and level switching error resolution
* Cleanup FRAG_GAP error creation and inlcude current buffer length in forward gap buffer limit
* Fix gap jump over waiting for data stall when buffer length is larger than maxBufferHole but less than one second
* Warn when observing "seeked" event with empty buffer (Related to #5274)
* Handle forward buffering past GAP tags in alt audio Playlists
* Fix GAP tag handling with Redundant Streams
* Implement penalty box for Redundant Streams
* Implement ErrorController …
Add Error Handling Integration Tests
Handle missed probe transmux probe with with FRAG_PARSING_ERROR
Handle encrypted init segment and subtitle decryption failure with FRAG_DECRYPT_ERROR
Remove delay when retrying after timeout
Trigger FRAG_LOADING after request is made
ERROR event data type must include an error property
Add stats to network loader error callbacks to allow error handling to use request timing
Remove use of console.warn from mp4-tools
Add missing TypeScript type exports
* Remove console.assert statements
Resolves#5218Closes#5221
* Remove unused frag buffered monitor
* Add Load Policies and deprecate frag/level/manifest timeout and retry config options
* Switch on FRAG_PARSING_ERROR or continue trying fragLoadPolicy.default.errorRetry.maxNumRetry (6) times
Fixes#5011
* Switch on FRAG_PARSING_ERROR or continue trying fragLoadPolicy.default.errorRetry.maxNumRetry (6) times 2/2
Fixes#5011
* Do not reload level after calling stopLoad() and startLoad()
Warn on currentFrag context reference change and use currentFrag to maintain correct stats ref
Fixes#5230
* Implement ErrorActions and Pathway Switching
* Fix part timeout handling
Cleanup frag stats handoff
* Update retry rules to require http status or timeout error (deprioritizes retry on parse errors)
* Retry audio and subtitle playlist loading after failure on level switch when no alternate is available
* 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
* Implement EXT-X-DEFINE Variable Substitution
Add support EXT-X-START in Multi-Variant Playlist
Add Content-Steering Multi-Variant Playlist parsing (#5074)
* Return parse error on undefined Variable Reference
Only track/return first parse error
Fix typos
* Use same error handling as FRAG_PARSING_ERROR for LEVEL_PARSING_ERROR
* Minor improvements to esdocs generated docs
* Use logical assignment on playlistParsingError
Co-authored-by: Rob Walch <rob@jwplayer.com>
* Improve bandwidth estimation and adaptive switching with smaller segments and higher TTFB
Fixes#3578 (special thanks to @Oleksandr0xB for submitting #4283)
Fixes#3563 and Closes#3595 (special thanks to @kanongil)
* Load rate and loaded delay calculation fixes
* Convert ttfbEstimate to seconds
* Include main variant init segments in TTFB sampling
* Use ttfb estimate in abandon rules down-switch timing
* Manage End of Stream state after flushing buffer
Fixes#5000
* Check last fragment buffered with contiguous buffered TimeRange for EOS
* Check EOS before resetting ENDED to IDLE near end
#5000
* End stream-controller idle tick on EOS before it can set nextLoadLevel
(prevent ABR switch in ENDED state)
* Use fragment-tracker to determine if last playlist fragment is buffered
(Fixes removal of tracked fragments while loading)
#5000
* Add support for com.apple.fps keySystem
* Improve support for DRM key-systems and key handling
Resolves#2833#2737#4318#4538
* Update README `licenseXhrSetup` example
* Update api-extractor markdown
* Attach CDM on start when even when initial fragments do not have a key associated with them
* Handle expired key status correctly
* Map key-sessions by key ID and log key ID more often than URI
* Support "clear-lead" key-session creation without new config
* Emit and handle FRAG_PARSING_ERROR from transmuxers (#5018)
* Emit and handle FRAG_PARSING_ERROR from transmuxers
Related to #5011
* Switch levels on Key and Fragment parsing errors or escalate to fatal error
* Route all key-system errors to `onFragmentOrKeyLoadError`
* Populate EMEKeyError.err for better demo error logging
* Remove `useEmeEncryptedEvent` and mark `widevineLicenseUrl` as deprecated in API.md
* Add support for EXT-X-SESSION-KEY tags (for key-system access on manifest loaded)
#4927
* Throw before licenseXhrSetup if key was removed
* Make key session promise chain more consice
* Stop on fatal key system errors
* Only request access to key-systems for keys matching those found in the config one at time (to avoid gaining access to WV and PR on Edge)
* Modify key-system helpers so that it's easier to support additional key-system strings
* Add undocumented `generateRequest` ("Content ID") filter
Co-authored-by: Vincent Valot <vincent.valot@bedrockstreaming.com>
* Schedule live reload time base on start of last update request
Use last fragment duration rather than target duration when playhead is less than two target durations from the live edge
* Eliminate JavaScript execution and setTimeout latency from playlist reload interval
* Comment out debug logs
* Reload live stream using last segment length when distance to playlist end is less than or equal to four target durations
(Reload is scheduled on update. With a default live sync of 3 target durations, without interruption, a distance of 3x-4x is most likely.)
* reload playlist at intervals based on target duration, according to HLS spec
* fixed unit tests for reload interval
* revert levelTargetDuration; use targetduration for reload interval
Co-authored-by: Matt Zucker <mattzucker@users.noreply.github.com>
* Fix handling of negative composition timestamps in ts->mp4 remuxing ("PTS < DTS" warnings)
Fixes#4878
* Only set trun version to 1 when track samples contain negative composition timestamps
* Only set trun version to 1 on video track trun boxes
* Do not reload partial fragments. They must be evicted from the tracker to reload.
(prevents loop loading on https://playertest.longtailvideo.com/adaptive/captions/playlist.m3u8 which now presents gaps in Safari)
* Fix for test stream with large DTS gap and bad composition timestamps