Commit Graph

144 Commits

Author SHA1 Message Date
Rob Walch 1e3453e1b1 Fix interstitial asset events not firing when attaching primary early for playout-limit change (#7467)
* Fix interstitial asset events not firing when attaching primary early for playout-limit change
* Add log message helper for timeline position updates
2025-08-20 16:08:06 -07:00
Tristan Matthews c64313bd2d Fix syntax in recoverMediaError example in API.md
This also addresses some formatting issues found by prettier.
2025-08-19 12:09:58 -07:00
Matt Joiner 5ea8f781be Minor improvements to docs (#7459) 2025-08-14 10:00:37 -07:00
Rob Walch 84e4fbdc3f Improve recoverMediaError documentation in API.md (#7447) 2025-08-04 16:08:08 -07:00
whdudtod1273 f50d6e5ffb Prevent playback freeze by checking buffer availability before updating playback position (#7210) 2025-05-08 11:35:42 -07:00
Kyle Seager 80f5c99b3e Enable synchronizing live start position with program boundary (#7211)
* Added `startOnSegmentBoundary` config option to sync start position with segment boundary

* Resolves #7209

---------

Authored-by: Kyle Seager <ks3773@exo.att.com>
2025-05-05 14:34:29 -07:00
Rob Walch 0cd55b85f1 Interstitials live start, buffering, and manager fixes and docs update (#7030)
* Interstitials improvements
- Add interstitialPlayer to InterstitialsManager and simplify interface
- Fix and cover expected playback state in interstitial event callbacks (where currentTime is derived from transitional controller state)
- Fix live start in append-in-place interstitial seeking to second start position when primary starts buffering after starting in interstitial
- Simplify playout-limit handling in asset player
- Add padding to flush front buffer call (prevents start of audio segment from being removed in Safari)
- Fix an issue where buffering an interstitial in place gets stuck when the video buffer is full, but the audio buffer is not (use combined buffer in stream-controller when there is no alt-audio source)
- Fix typos (Interstitals > Interstitials)

* Add `interstitialsManager.interstitialPlayer.assetPlayers` tests - verify playingIndex player is present for relevant asset events
2025-02-25 17:28:39 -08:00
Rob Walch b9f85e9c78 Fix seeking into and over multiple EXT-X-GAP segments (#6988)
* Fix seeking into and over multiple EXT-X-GAP segments
Fixes #6814

* Add `hls.loadLevelObj` to API - replaces internal use of `hls.levels[hls.loadLevel]`
2025-02-03 17:27:09 -08:00
Rob Walch 305a3a7477 Flush MSE rendering pipeline when crossing video buffer holes with audio (#6972)
* Flush MSE rendering pipeline when crossing video buffer holes with audio
Resolves #5631
* Don't wait to nudge when stalling with waiting event
Fixes #6169
* Add `hls.inFlightFragments` to Hls API. Used to determine if gap-controller should wait for in-flight media segments before seeking over gaps.
2025-01-31 16:23:13 -08:00
Stefan Huber f53373f586 feat: maxDevicePixelRatio limits the browser's value (#6825) 2024-11-14 11:03:54 -08:00
Rob Walch 06f0e755d4 HLS Interstitials Support (#6591) 2024-10-03 15:19:12 -07:00
Rob Walch 306cd1d572 Add videoPreference.videoCodec to API.md 2024-09-13 08:53:04 -07:00
Glyn Davies 5eb0e32837 CMAF KLV support via Metadata callback (#6674)
* Changes to support returning CMAF based KLV data to your HLS client

This leverages the existing metadata callbacks for ID3 tags
Not sure this is the best way, but it works for my simple testing

* Run through prettier

* Add enableEmsgKLVMetadata option (default false)

* Commiting API change for new config option enableEmsgKLVMetadata

* Added details of the new config enableEmsgKLVMetadata (default false) and exposing of MetadataSchema along with changes to the FRAG_PARSING_METADATA event
2024-09-09 15:12:53 -07:00
Rob Walch 37c2b389dc Update API.md to reflect maxBufferHole v1.0 default (#6578) 2024-08-02 14:18:00 -07:00
iBobo 8f8e4922a6 Add public url getter to return the currently playing url (#6411)
* Add public url getter to return the currently playing url

* Add entry in the docs for get url

* Fix TOC
2024-07-03 11:58:03 -07:00
vk342 9da3d96d2c Support setting targetLatency (#6473)
* Allow setting targetLatency

* fix prettier warnings

* fix failing test liveSyncOnStallIncrease

* restore test liveSyncOnStallIncrease

---------

Co-authored-by: Rob Walch <robwalch@users.noreply.github.com>
2024-07-01 08:05:44 -07:00
vk342 8555f8b09c Add liveSyncOnStallIncrease config option (#6455)
* add liveSyncOnStallIncrease config option

* update hls.js.api.md
2024-06-28 14:04:23 -07:00
Andreas Hermann 18419d772e Clarify capLevelToPlayerSize docs in API.md (#6384) 2024-05-06 11:57:22 -07:00
Pavel Fomin 977c603dd2 API.md update removeLevel
fix after rebase
2024-03-20 14:46:17 -07:00
Rob Walch 74f634ffdd Update API.md for CMCD includeKeys 2024-02-07 17:17:01 -05:00
Rob Walch e93f0bbcdd Fix regression that removed (unofficial) support for startLevel above max level index
Fixes #6172

(cherry picked from commit 88d54a9602)
2024-02-06 16:59:49 -08:00
Rob Walch fad22f2ef3 Merge pull request #6006 from video-dev/feature/is-supported-codec-expansion
Expand isSupported check to allow alternative codecs
2023-12-04 17:21:14 -08:00
Rob Walch df759ae3f0 Add isMSESupported check
Add named exports for and expose statically: `isSupported`, `isMSESupported`, and `getMediaSource`
2023-11-30 16:37:24 -08:00
Evan Burton e651e83066 Add videoPreference config option for HDR/SDR VIDEO-RANGE selection and priority
Resolves #2489
2023-11-30 12:40:04 -08:00
Rob Walch d4d585b3f5 API enhancements for audio and subtitle selection
Resolves #5532
2023-11-26 10:35:41 -08:00
Celeste Glavin b52bab7587 chore(docs): add more info around backBufferLength (#5841) 2023-09-22 17:52:13 -07:00
Rob Walch 7c5a2d2f93 Add preferManagedMediaSource API.md doc entry for ManagedMediaSource usage (#5828)
* Add `preferManagedMediaSource` API.md doc entry, and only emit BUFFER_FLUSHED with removed ranges in ManagedMediaSource "bufferedchange" event

* Add BufferedChangeEvent TypeScript interface
based on w3c proposal https://github.com/w3c/media-source/issues/320
2023-09-20 08:39:21 -07:00
Rob Walch 301be58cc4 Add config flag for maximum front buffer frontBufferFlushThreshold (#5761)
Fixes #5479

Co-authored-by: Evan Burton <eburton2@apple.com>
2023-08-31 14:03:52 -07:00
Rob Walch 82a2589574 Custom shouldRetry in retryConfig (follow up) (#5762)
* Custom shoudRetry in retryConfig (#5658)

Co-authored-by: pfomin <pfomin@ivi.ru>

* Replace httpStatus argument with LoaderResponse in config.shouldRetry #5658

---------

Co-authored-by: Pavel Fomin <me@pavelfomin.ru>
Co-authored-by: pfomin <pfomin@ivi.ru>
2023-08-31 10:27:26 -07:00
Morgan Zolob edcef9a954 Add additional documentation for workerPath config (#5765) 2023-08-28 12:27:53 -07:00
renovate[bot] 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 Walch 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 Walch bc60dbfe12 Base initial bandwidth estimate on first level's bitrate (#5649)
Resolves #2754
2023-07-13 14:10:32 -07:00
Guillem Cabrera 966bd3d08b Fire STEERING_MANIFEST_LOADED event when loading a Content Steering Manifest (#5417)
* 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
2023-05-26 13:35:04 -07:00
Rob Walch 8befacd2be Remove startLoad() as recovery method from API.md doc (#5478)
#5476
2023-05-10 14:52:30 -07:00
Tom Jenkinson 0d7db5b7a7 reference v1 jsdelivr url in v1 api doc
people should be using that over latest so that things don't break when we release v2 with potentially breaking changes. Main readme already used v1 url
2023-04-12 15:52:45 +01:00
Rob Walch c5134d8a2a Relax TTFB timeout on manifest request (#5364)
* Relax TTFB timeout on manifest request
(Add support for LoadPolicy `maxTimeToFirstByteMs` of Infinity and similarly ignore value of 0)

* Add LoadPolicy API documentation
2023-04-04 11:00:34 -07:00
Rob Walch 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 Walch 3e959c289f GAP Tag/Attribute Support with FRAG_GAP Error (#5257)
* 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
2023-03-23 13:53:30 -07:00
Rob Walch 92abd5b891 Update config.xhrSetup type defintiions API documentation
Exit async xhrSetup if aborted early
2023-03-21 17:32:55 -07:00
Tom Jenkinson 4318e948ec switch cf deployment to video-dev.org 2023-03-17 20:08:53 +00:00
Tom Jenkinson 489e9419ce Switch from netlify to CloudFlare Pages (#5305)
* add a script that will deploy the `netlify` dir to cloudflare pages

* switch everything from netlify over to cf pages

* fix wrangler version

* add `/` to api-docs url

* fix name of cloudflare dev project
2023-03-17 16:07:30 +00:00
Rob Walch 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 485fe15f08 Replace ESDocs generated api-docs with api-documenter markdown (#5163) 2023-01-20 08:57:20 -08:00
Rob Walch 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
Luke Pommersheim 39775fe8eb Documentation - Add interface for AbrController (#4842)
* create an interface for abr controllers

* use AbrComponentApi interface in abr-controller.ts

* update docs for custom abr controllers

* remove clearTimer from abr interface and documentation
2023-01-15 21:49:10 -08:00
Rob Walch 01c48d6ca5 Revert "Documentation - Add interface for AbrController (#4842)"
This reverts commit 617d78bcb7.
2023-01-15 21:47:54 -08:00
Luke Pommersheim 617d78bcb7 Documentation - Add interface for AbrController (#4842)
* create an interface for abr controllers

* use AbrComponentApi interface in abr-controller.ts

* update docs for custom abr controllers

* remove clearTimer from abr interface and documentation
2023-01-15 21:39:50 -08:00
Rob Walch 311ac64dc5 Implement maxHdcpLevel HDCP-LEVEL capping and EME error handling (#5150)
Resolves #4923
Closes #4966
2023-01-11 13:24:22 -08:00
Rob Walch 7f8ffc6af7 Clarify that LEVEL_LOADING is not called for media playlists loaded via loadSource (#5144)
Closes #4851
2023-01-06 11:21:23 -08:00