184 Commits

Author SHA1 Message Date
Rob Walch c7c28767d0 Add support for #EXT-X-I-FRAME-STREAM-INF and #EXT-X-I-FRAMES-ONLY (#7757) 2026-04-06 12:12:41 -07:00
Dzianis Dashkevich 3112e7071b feat: Max Unchanged Live Updates (#7704) 2026-01-26 22:58:48 -08:00
Yury Yarashevich ceb24f18a1 #7064: Check integrity of MPEG-TS video stream. 2026-01-15 18:28:28 -08:00
Kyle Seager d10ce09808 Implemented smooth audio switching (#7575)
Authored-by: Kyle Seager <kyle.seager@mydirectv.com>
2026-01-15 10:23:36 -08:00
Jeremy Corbello b83ec76d74 feat: Add MISB KLV metadata extraction from MPEG-TS and CMAF streams (#7668) 2025-12-09 17:10:01 -08:00
Dzianis Dashkevich a13b5cefc1 feat: Add SourceBuffer append operation timeout handling (#7670) 2025-12-09 14:15:42 -08:00
Chris Triantafilis 8059e45c0e feat: Add abrSwitchInterval config option (#7669)
* Add abrSwitchInterval configuration parameter

* Update nextLoadLevel to use abrSwitchInterval config option

* Add tests for abrSwitchInterval
2025-12-09 11:22:14 -08:00
Kyle Seager 36078f82ac Fixed issue where certain Tizen devices would get stuck seeking over buffer gaps (#7630)
Authored-by: Kyle Seager <kyle.seager@mydirectv.com>
2025-11-14 15:19:33 -08:00
Kyle Seager 66d523e66b Merge pull request #7628 from krseager/improve-hls-js-documentation
Update API documentation
2025-11-07 14:18:17 -05:00
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
Rob Walch cb7a5887ad Apply prettier@3.6 formatting 2025-07-08 10:27:00 -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
neil-liu edd058cb43 Fixed an error in the documentation on stream-controller.ts (issue #6366) (#6367) 2024-05-06 14:00:55 -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