Commit Graph
33 Commits
Author SHA1 Message Date
Rob WalchandRob Walch ac26032af2 User unique logger configurations across instances of Hls(js)
Resolves #2461
2024-01-25 12:04:54 -08:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>Tom Jenkinson
359197f20b chore(deps): update dependency prettier to v3 (#5646)
* chore(deps): update dependency prettier to v3

* run prettier

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tom Jenkinson <tom@tjenkinson.me>
2023-08-22 11:24:59 +01:00
Rob WalchandGitHub b536883327 Initial selection and level filtering based on preferred codecs and MediaCapabilities (#5704)
* 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
2023-08-21 15:24:26 -07:00
Rob WalchandGitHub bc60dbfe12 Base initial bandwidth estimate on first level's bitrate (#5649)
Resolves #2754
2023-07-13 14:10:32 -07:00
Rob WalchandGitHub f4629d3fc3 Fix Low-Latency part and fragment tracking (#5423)
* 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
2023-05-03 04:57:34 -07:00
Rob WalchandGitHub 9cafa433b5 Do not clear subtitle cues or fragment tracking when updated subtitle tracks are identical (#5365)
Fixes #5361
2023-04-04 18:23:42 -07:00
Rob WalchandGitHub 766ec37691 Content Steering (#5191)
* 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
2023-02-18 12:20:14 -08:00
800c35fca5 Multi-DRM Support (#4930)
* 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>
2022-12-15 08:23:03 -08:00
Rob Walch 5e8468a333 Align live WebVTT subtitle playlists with main variant using media-sequence when program-date-time is unavailable
Resolves #3987
2021-06-02 21:40:38 -04:00
Rob Walch cb34a0f474 Prevent async abort handler from causing current fragment to be reloaded
Fixes #3811 #3847
2021-05-03 22:16:28 -04:00
Tom Jenkinson 729a36d409 switch to default print width 2020-12-24 13:31:43 +00:00
Tom Jenkinson 7342d4a6db run 'npm run prettier' 2020-12-23 20:15:35 +00:00
Rob Walch f5b7261339 Merge maMerge branch 'master' into feature/v1.0.0 2020-10-10 17:22:05 -04:00
Rob Walch a6943fc55b Fix test failing with #3063 2020-10-08 18:05:27 -04:00
Rob Walch 1cb049d4ed Complete delta-playlist merging and playlist alignment
- Do not adjustSliding twice with delta playlist
- Add LevelDetail adjustedSliding distinguished from PTSKnown (+5 squashed commits)
- Align streams without DISCONTINUITY, PROGRAM-DATE-TIME, or known-PTS on SEQUENCE-NUMBER to improve first fragment requested
- Fix delta playlist merging without fragment PTS (adjustSliding with skipped segments)
- Fix playlist sliding check
- Sync levels on PTS by setting transmuxer defaultInitPTS
Add playbackRate controls to demo
- Add lowLatencyMode config (doesn't yet disable part playlist loading)
- Add SKIP delta playlist tag to README
2020-10-02 13:52:25 -04:00
Jamie Stackhouse 050694ff0a Update tests to have a first parameter as the event name. 2020-01-11 02:08:05 -04:00
Jamie Stackhouse 6bb71c83fb Working towards making event emitter less of a breaking change. 2020-01-11 00:46:31 -04:00
Jamie Stackhouse ef593cb728 Fixing the last unit tests to use the new emit API. 2019-11-26 18:38:03 -04:00
Jamie Stackhouse 07da07fbc2 Work on getting tests to pass.
Updating them to match the new API.
2019-11-25 17:43:52 -04:00
Jamie Stackhouse ac806c6671 Merge remote-tracking branch 'origin/feature/v1.0.0' into strict-event-emitter 2019-11-14 20:58:28 -04:00
Jamie Stackhouse 523df0a08f Convert more triggers to emits. 2019-11-14 20:43:32 -04:00
Rob Walch 68fb4010c8 Fix unit tests 2019-11-06 21:29:13 -05:00
Jamie Stackhouse ec1e2b4731 Rename Event -> Events Enum. Move from default to named export.
Named exports can be more easily tree-shook or deadcode detected by the
available options that can do that, so using them over default exports
could make a future optimization easier to do.
2019-10-14 21:29:31 -03:00
Rob Walch 08d8800fc5 Improve type definitions for parsed manifests and controller levels/tracks 2019-10-08 14:37:52 -04:00
OrenMe eb35560259 fix test 2019-10-08 01:12:51 +03:00
John Bartos a6a7c29137 Initial merge (with errors) 2019-09-11 17:59:11 -04:00
John BartosandGitHub 656a681f7c Implement live VTT subtitle loading (#2148)
* Start and stop subtitle loading in sync with startLoad()/stopLoad() API calls
* Compute sliding & merge subtitle playlists during live playback
* Fix shared references between subtitle-track-controller and subtitle-stream-controller
* Refactoring:
     * Extend subtitle-stream-controller from base-stream-controller
     * Move more shared logic into base-stream-controller
     * Move live reload interval calculation into a shared function & import into subtitle-track-controller
    * Remove the trackId from subtitle fragments, and refer to them by their level property
    * Several other minor refactorings (flipped conditionals, destructuring args, organizing functions)
* Add a bunch of unit tests
2019-03-11 10:30:27 -04:00
John BartosandGitHub 2b885d9c29 Feature/frag loading refactor (#196)
* Refactor fragment-loader to directly return results via promise
Refactor classes which load fragments in order to utilize new promise flow

* Typescript fragment loading classes

* Fix exceptions; rename tracks[] to levels[] in *-stream-controllers for compatibility in base-stream-controller
2019-02-26 12:50:48 -05:00
John Bartos d1c97c691d Add unit tests, refactor 2019-02-08 16:31:19 -05:00
John Bartos 01f588ba7f Apply sliding using last AV start time if playlists do not overlap; use simple fragment loading scheme 2019-02-07 12:03:32 -05:00
John BartosandGitHub 86b4e15d53 Upgrade tests to Chai BDD & optimize runner (#2037)
* Convert tests to Chai BDD

* Invoke mocha with exit so that travis doesnt hang on func test completion
2019-01-25 18:29:37 -05:00
John Bartos 130a0695f6 Upgrade new tests to chai bdd 2018-11-27 12:39:55 -05:00
Stephan HesseandJohn Bartos b2d0daa8e2 Subtitle-stream-controller: Load fragments in sync with streaming and resolve via PTS/PDT (#1882) 2018-11-26 11:02:45 -05:00