Commit Graph
27 Commits
Author SHA1 Message Date
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 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
8e6efb1c12 Migrate to Rollup with new ESM target and improved Worker support (#5299)
* 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>
2023-03-27 11:03:39 -07:00
Rob WalchandGitHub 8063580aa0 Error Handling controller and LoadPolicies (#5241)
* 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 #5218
Closes #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
2023-02-27 11:31:16 -08: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
Rob WalchandGitHub 485fe15f08 Replace ESDocs generated api-docs with api-documenter markdown (#5163) 2023-01-20 08:57:20 -08:00
6f6fa2e9bf Implement EXT-X-DEFINE Variable Substitution (#5161)
* 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>
2023-01-19 16:52:12 -08:00
Rob WalchandGitHub 0f14a22ce7 Improve bandwidth estimation and adaptive switching (#4825)
* 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
2023-01-18 10:54:55 -08:00
Rob WalchandGitHub 6216ab91fd Fix handling of negative composition timestamps (#4885)
* 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
2022-09-09 16:57:32 -04:00
Rob WalchandGitHub 551f133266 Fix seek to live start regression introduced in #4864 (#4887) 2022-09-08 10:46:33 -04:00
Rob WalchandGitHub afb38ec9f6 Resume streaming after bitrate test with low max buffer (#4866)
* Resume streaming after bitrate test with low max buffer
Fixes #4865

* Skip bandwidth test with only one level
2022-08-29 14:38:05 -04:00
Rob WalchandGitHub 985921143a Fix subtitle buffered check (#4863) 2022-08-26 20:52:35 -04:00
Rob Walch 9ff3ab83de Honor startPosition from config/startLoad with live streams
Do not sync with live edge when inside sliding window and liveMaxLatencyDuration
Fixes #3736
2021-04-07 18:49:58 -04:00
Rob Walch e0cde056af Ignore out-of-range level indexes as in previous major version
Fixes #3618
2021-03-17 12:36:44 -04:00
Rob Walch ff7a5d2672 Fix live fragment finder logic
#3528
2021-03-02 13:50:29 -05:00
Jamie Stackhouse 793b34fd43 Setup API extractor. 2021-02-07 14:33:39 -04:00
Rob Walch 8c431402a8 Fix support for AAC audio-only with no "com.apple.streaming.transportStreamTimestamp" ID3 or DISCONTINUITY tags
http://playertest.longtailvideo.com/adaptive/jazzy/prog_index.m3u8
2020-12-30 00:01:03 -05:00
Rob Walch 5555971077 Remove pause and nudge on immediate level switch. Immediate level switch simply aborts current frag and flushed the entire buffer.
Fixes #3336
2020-12-29 15:21:39 -05: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 8d0398bb75 Improve remuxing of non-independent segments and backtracking
Fixes #2808
2020-12-21 18:26:03 -05:00
Rob Walch 7ec2d6695a Part loading ts segments (no alt audio) 2020-11-06 13:58:57 -05:00
Rob Walch 29c7ee51a4 Add latency controller unit tests 2020-11-06 00:38:53 -05:00
Rob Walch 0e24ba32c9 Run sync to live edge following level update 2020-11-05 14:18:48 -05: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
Rob Walch f3e5f6e71d Use part duration in edge segments
Cleanup code TODOs
2020-09-22 19:50:11 -04:00