Commit Graph
26 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 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 Walch 300cce6ea2 Add unit tests 2022-07-26 14:18:37 -07:00
Rob Walch 0d53e94846 Guard against exceptions caused by destroying player in buffer stall error callbacks
Fixes #4525 (related #4478)
2022-07-14 17:23:44 -07:00
8bcb0a5a36 [skip netlify] Update dependency sinon to v14 (#4695)
* [skip netlify] Update dependency sinon to v14

* use existing clock object in gap controller test

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Tom Jenkinson <tom@tjenkinson.me>
2022-05-15 10:34:20 +00:00
Tom Jenkinson 77e4dd1509 add failing test 2022-01-13 16:57:08 +00: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
Jamie Stackhouse 07c3012139 Merge remote-tracking branch 'origin/feature/v1.0.0' into strict-event-emitter 2020-01-11 02:31:29 -04:00
Jamie Stackhouse 6bb71c83fb Working towards making event emitter less of a breaking change. 2020-01-11 00:46:31 -04:00
Rob Walch f2dcbabfbb Enforce 'no-unused-vars' lint rule 2020-01-08 15:23:51 -05:00
Rob Walch 8ad6dcc5e3 Merge branch 'upstream/master' into feature/v1.0.0
* upstream/master: (81 commits)
  Prevent seeking to 0 when startPosition is -1 Fixes #2438
  Prevent RangeError exception when parsing incomplete PES Fixes #2415 Relates to #2109
  Log license key size (DRM functional test troubleshooting)
  Improve functional test assertion feedback
  Handle stalls when seeking into buffer gaps
  Update gap controller to observe buffer gaps regardless of max buffer hole
  Update gap-controller comments
  Add seek back to start functional test
  Fix start gap jumping with partial fragments and when seeking back to start
  Reset stall time after seeked and fix logger statments
  Fix partial and large start gap jumping
  Do not jump gaps larger than JUMP_THRESHOLD_SECONDS
  Update gap-controller comments
  Avoid jumping gaps that Chrome will jump Prevent reporting stalls right after "seeked"
  Jump start gap in Safari fixes #2436
  Update gap-controller to match v1 branch
  gap-controller: add handling for audio-only autoplay issues in Chrome
  gap-controller: improve some log lines
  gap-controller: add unit tests for initial gap skipping + paused/hasPlayed cases
  gap-controller: documentation/comments improvements
  ...

# Conflicts:
#	package-lock.json
#	scripts/travis.sh
#	src/controller/audio-stream-controller.js
#	src/controller/audio-track-controller.ts
#	src/controller/buffer-controller.ts
#	src/controller/gap-controller.js
#	src/controller/id3-track-controller.js
#	src/controller/stream-controller.js
#	src/controller/subtitle-stream-controller.ts
#	src/controller/subtitle-track-controller.ts
#	src/controller/timeline-controller.ts
#	src/demux/tsdemuxer.ts
#	src/events.js
#	src/loader/m3u8-parser.ts
#	src/utils/buffer-helper.ts
#	tests/functional/auto/setup.js
#	tests/test-streams.js
#	tests/unit/controller/ewma-bandwidth-estimator.js
#	tests/unit/controller/gap-controller.js
#	tests/unit/controller/subtitle-stream-controller.js
2019-12-09 15:40:27 -05:00
Rob Walch 3f94299b2d Handle stalls when seeking into buffer gaps 2019-12-03 18:47:19 -05:00
Rob Walch a4732c39b1 Update gap controller to observe buffer gaps regardless of max buffer hole 2019-12-03 13:13:58 -05:00
Jamie Stackhouse 4a4f8b51b6 Merge branch 'feature/v1.0.0' into strict-event-emitter 2019-11-26 18:42:30 -04:00
Jamie Stackhouse ef593cb728 Fixing the last unit tests to use the new emit API. 2019-11-26 18:38:03 -04:00
Rob Walch 7f18b47589 Gap controller fixes 2019-11-22 17:42:58 -05: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
Rob Walch 6dc950579b Jump start gaps and don't report stalls when starting playback or seeking
Convert gap-controller to TypeScript
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 40c5d27ac2 Enforce one-var and add prefer-const eslint rules with fixes 2019-09-18 16:26:48 -04:00
John Bartos 11e733ad67 Fix failing tests 2019-07-18 18:36:07 -04:00
John BartosandGitHub 2d601088f0 Improve unit tests (#173)
Convert unit tests from Node assertions to Chai BDD
2018-11-12 13:51:33 -05:00
John BartosandGitHub 301af92f51 Improve stall detection and resolution (#1808) 2018-07-19 10:32:07 -04:00