v1.6.2
HLS.js v1.6.2 includes bug fixes and improvements over the last release.
https://github.com/video-dev/hls.js/compare/v1.6.1...v1.6.2
- Fix live "discontinuity sequence mismatch" regression (#7168) @robwalch
- Do not skip loading of parts that were previously buffered (#7167)
https://e5abc373.hls-js-dev.pages.dev/demo/
If you are upgrading from version v0.14.17 or lower, see the MIGRATING guide for API changes between v0.14.x and v1.0.0.
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.6.1
HLS.js v1.6.1 includes bug fixes and improvements over the last release.
https://github.com/video-dev/hls.js/compare/v1.6.0...v1.6.1
- Fix streaming interruption from exception thrown setting MediaSource duration (#7148) @robwalch
- Make appendBuffer errors fatal when HTMLMediaElement.error is present (#7147)
- Guard against exceptions when parsing incomplete codec boxes (#7146)
- Warn on muxed mp4 with alt-audio (unsupported media configuration) (#7153)
- Support disabling alternate audio with config (#7154)
- Timeout
mediakeySession.remove()
and only call for persistent-license sessions (#7050) @JackPu - Add workaround for Xbox One
keyStatuses.forEach
callback not work well (#7150)
https://26b6689f.hls-js-dev.pages.dev/demo/
If you are upgrading from version v0.14.17 or lower, see the MIGRATING guide for API changes between v0.14.x and v1.0.0.
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.6.0
HLS.js v1.6.0 introduces support for HLS Interstitials with new API features, media support, and playback enhancements.
- HLS Interstitials Support (#6591, #6756, #6852, #6894, #6898, #6900, #6903, #6904, #6905, #6913, #6914, #6915, #6991, #7002, #7014, #7024, #7030, #7049, #7077, #7124, #7131) @robwalch, @matvp91
- Improve support for DolbyVision profiles 8 and 10 with supplemental codecs parsing (#7120, #7095) @timitt, @robwalch
- AES-256 and AES-256-CTR encryption methods (#6018) @jvary
- H.265/HEVC in MPEG2-TS (#5847, #6724, #6194, #6268, #6940) @devoldemar
- CMAF KLV Metadata (set
enableEmsgKLVMetadata
totrue
to enable) (#6674) @glynd - Add APIC ID3 parsing via @svta/common-media-library ID3 refactor (#6260) @felipeYoungi
- Support playback of unknown CODECS with browser mime-type support (#6620) @robwalch
- #EXT-X-BITRATE support (#6843)
- CMCD "nor" added (#6091) @littlespex
- Improved stall detection and buffer gap handling (#6941)
- Flush MSE rendering pipeline when crossing video buffer holes with audio (#6972)
- Media Playlist parser validation errors (#7119)
- Added
config.detectStallWithCurrentTimeMs
- Added
config.nudgeOnVideoHole
- Added
config.enableInterstitialPlayback
set to false to disable Interstitial playback without turning off Interstitials parsing and events - Added
config.interstitialsController
set tonull
to disable Interstitials support completely - Added
config.interstitialAssetListLoadPolicy
defines the loading policy of X-ASSET-LIST JSON - Added
config.liveSyncOnStallIncrease
(#6455) @vk342 - Added
config.maxDevicePixelRatio
to limit browser value when capping level to media element dimensions (#6825) @signalwerk - Added
config.videoPreference.videoCodec
video codec selection preference option (#6483) - Added config options specifically for Interstitial asset player instances:
config.primarySessionId
identifies the parent player session that spawned the asset player (read fromhls.sessionId
)config.assetPlayerId
identifies logs from asset playersconfig.timelineOffset
offsets MSE appends for gapless playback
- Support
config.fetchSetup
optional async result (#6714) @zce - Added
hls.bufferedToEnd
read-only indicates when EOS has been appended (media is buffered from currentTime to end of stream) - Added
hls.bufferingEnabled
read-only flag toggled withpauseBuffering()
andresumeBuffering()
- Added
hls.hasEnoughToStart
getter returns whether enough is buffered to seek to start position (#6571) - Added
hls.inFlightFragments
- Added
hls.interstitialsManager
read-onlyInterstitialsManager
ornull
. TheInterstitialsManager
is an interface for accessing program information and methods for seeking across items and skipping Interstitials. - Added
hls.latestLevelDetails
read-onlyLevelDetails
object of the most up-to-date HLS variant Playlist data - Added
hls.loadLevelObj
read-onlyLevel
object of selected level (variant) ornull
- Added
hls.loadingEnabled
read-only flag toggled withhls.startLoad()
andhls.stopLoad()
- Added
hls.pathwayPriority
Content-Steering setting (#6295) @PavelFomin90 - Added
hls.pathways
getter (#6997) @grabofus - Added
hls.sessionId
read-onlyHls
instance UUID - used to assign a value to the _HLS_primary_id query parameter of interstitial requests - Added
hls.startPosition
read-only the resolvedstartPosition
that playback will begin at once media is appended - Support setting
hls.targetLatency
(#6473) @vk342 - Added
hls.transferMedia()
detaches and returns MediaSource and SourceBuffers non-destructively - Added
hls.url
read-only value of the currently playing url (fromhls.loadSource(url)
) (#6411) @ibobo - Added
Events.MEDIA_ENDED
event (#6141) - Added
Events.EVENT_CUE_ENTER
(for internal use) - Added
levelInfo: Level
toLevelLoadingData
andLevelLoadedData
event data - Added
track: MediaPlaylist
toTrackLoadingData
andTrackLoadedData
event data (audio and subtitle events) - Added
withoutMultiVariant: boolean
toLevelLoadedData
event - Added
LevelDetais.expired
read-only indicates live playlist data is no longer valid for fragment loading - Added
LevelDetais.requestScheduled
to improve live playlist reload scheduling - Added read-only
Fragment.bitrate
andFragment.byteLength
getters - Several
Fragment
properties have been replaced with accessors:get baseurl()
,get/set stats()
,get/set programDateTime()
. Class property accessors are not enumerable. This impacts copying object properties and serialization.Fragment.stats
remain enumerable with (#6999) - Enhancements:
hls.startLoad()
takes a second optional argument to skip seeking on start (otherwise, HLS.js seeks following to the first optionalstartPosition
argument on append)hls.attachMedia()
supports transferring MediaSource and SourceBuffers fromHls
instances withhls.transferMedia()
hls.recoverMediaError()
seeks to the value ofcurrentTime
before the source reset is performed (#6297)
- New Events:
ASSET_LIST_LOADING
when a request is made for an X-ASSET-LIST JSON objectASSET_LIST_LOADED
when a response is received for an X-ASSET-LIST JSON objectINTERSTITIALS_UPDATED
when Interstitials are added, removed, or the schedule is updated following a variant playlist update or updated asset durations from X-ASSET-LIST JSON or asset playlist and media parsingINTERSTITIALS_BUFFERED_TO_BOUNDARY
when the forward buffer reaches the boundary of the following schedule item (Interstitial event or primary segment)INTERSTITIAL_ASSET_PLAYER_CREATED
when an asset player instance is created to stream an Interstitial asset (will always be before attaching media to the asset player)INTERSTITIAL_STARTED
when streaming of an Interstitial event containing one or more assets has begun (may occur before X-ASSET-LIST JSON is loaded or playback has started)INTERSTITIAL_ENDED
when streaming of an Interstitial event containing one or more assets has ended - before resuming primary or starting the next eventINTERSTITIAL_ASSET_STARTED
when streaming of an Interstitial asset has begun (following the beginning of the event or the end of the last asset)INTERSTITIAL_ASSET_ENDED
when streaming of an Interstitial asset has ended (before the next asset or the event ending)INTERSTITIAL_ASSET_ERROR
when an error occurs starting or streaming an Interstitial asset (this can include non-fatal errors such as stalling and errors that will end streaming of the asset, resulting in the schedule advancing to the next asset or fallback to primary)INTERSTITIALS_PRIMARY_RESUMED
when playback of primary content has begun or resumed from an Interstitial eventBUFFERED_TO_END
when the last audio and video segments in the playlist have been appended (EOS signaled on all SourceBuffers)AUDIO_TRACK_UPDATED
similar to LEVEL_UPDATED fired for any update to audio group playlistsSUBTITLE_TRACK_UPDATED
similar to LEVEL_UPDATED fired for any update to subtitle group playlists
- Updated Events
MEDIA_ATTACHING
,MEDIA_ATTACHED
,MEDIA_DETACHING
, andMEDIA_DETACHED
include additional information (depending on whether media is being transferred)
- New Errors
- Type:
NETWORK_ERROR
- details:
ASSET_LIST_LOAD_ERROR
network error loading asset list - details:
ASSET_LIST_LOAD_TIMEOUT
network timeout error loading asset list - details:
ASSET_LIST_PARSING_ERROR
asset list was not valid JSON or missing required data
- details:
- Type:
OTHER_ERROR
- details:
INTERSTITIAL_ASSET_ITEM_ERROR
an issue interrupted or prevented asset playback. This will result in skipping the remainder of the asset or falling back to primary content. The eventerror
will contain more details. This type of error differs from theINTERSTITIAL_ASSET_ERROR
events forwarded from asset player errors. - details:
ATTACH_MEDIA_ERROR
when callingattachMedia
with falseymedia
argument (#6556) @agajassi
- Support more key system error detail (#6807) @JackPu
- details:
KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR
- details:
KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR
- details:
KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR
- details:
- details:
- Type:
- Reduce workers across instances (#6550) @robwalch
- Upgrade TypeScript to 5.8 (#7084, #7099)
- Update all type imports to explicitly use the type keyword. (#6332) @cjpillsbury
- Tidy import statements with linter rules (#6378) @robwalch
- Add strict type checking for Uint8Array/ArrayBuffer (#5849) @robwalch
- Log playback rate adjustments. (#7115) @mstyura
- Separate the calculation of the next level into a protected method (#7040) @Kouji-Koike
- Do not close key session on detach (wait until destroy) (#6966) @JackPu
- Make latency-controllers getters safe to call after destroyed (#7015) @robwalch
- Use WebCrypto by default for AES decryption (#6015) @robwalch
- Lazy init CEA608 parsers (#6127) @robwalch
- Use unique logger configurations across instances (#6131, #6198, #6242) @robwalch
- Use average for level sorting and abandon rules check (#6135, #6146) @robwalch
- Handle
ManagedMediaSource
"endstreaming" events without aborting requests (#6186) @robwalch - Apply LL-HLS
_HLS_skip
param based on age of last playlist request (#6300) @mcintyrehh - Skip Low-Latency HLS segment and part directives after long delay (#6080) @robwalch
- Switch between LL-HLS part and fragment loading based on playback position (#6170) @robwalch
- Block audio append queue to keep AV appends in lock-step (#6217) @robwalch
- Sync audio fragment loading with main discontinuity and time (#6491) @robwalch
- Unblock audio-only rendition loading (#6862) @robwalch
- Fix audio segment loading when main segments loaded out of sequence (#6537) @robwalch
- Ensure media element references are removed after calling detachMedia (#6249) @robwalch
- DateRange parsing and validation enhancements for Interstitials (#6213) @robwalch
- Program-date-time, date-range, and fragment parsing optimizations (#6811) @robwalch
- Move hash function into utils (#6503) @robwalch
- Remove unused method
remuxEmptyAudio
(#6534) @robwalch - Log parsed segment timestamps ahead of append (#6549) @robwalch
- Check-in on abandon rules check and abort in-flight frag when stuck on playlist loading (#6763) @robwalch
- Fragment 4xx network error handling improvements (#6853) @robwalch
- Replace non-null assertions in xhr-loader and gate evoking of loader callbacks (#6942, #6359) @robwalch @ReactWithRajesh
- Exclude AC3 and HEVC remuxing from light build (#6944) @robwalch
- Support TypeScript Node16/NodeNext module resolution (#6616) @robwalch
- Add missing TypeScript exports (included with #6951, #6972)
- Export
XhrLoader
,FetchLoader
,Cues
,Events
,ErrorTypes
,ErrorDetails
,Level
,SubtitleStreamController
,KeySystems
,KeySystemFormats
,fetchSupported
,requestMediaKeySystemAccess
ES Modules (#6733) @robwalch - Export
M3U8Parser
ES Modules (#7132) @Acconut - Add shortcut for
light
version (#6925) @denisx - Force media capabilities check for HEVC to avoid failure on Windows (#6849) @robwalch
- Fix seek during live start on low-power devices (#7063) @grabofus
- Improve Live start with slow conditions (#7076) @robwalch
- Live playlist advancement improvements (#6692, #6857, #6872) @robwalch
- Limit live playlist reloading to scheduled updates (#6873) @robwalch
- Live reload throttling per level details schedule (#6879) @robwalch
- Wait for playlist updates before requesting segments from expired playlists (#6855) @robwalch
- Fix fmp4 track timestamp alignment for non-av tracks (#7126)
- Fix loop loading of empty segment with worker disabled (#7090)
- Override media-capabilities result for HEVC support in Windows Firefox (#7048)
- Fix JSON.stringify with circular dependencies (#7037) @martmol
- Replace JSON.stringify with safe stringify module (#7045) @robwalch
- Fix seeking into and over multiple EXT-X-GAP segments (#6988)
- Workaround Safari "ended" event not firing when EoS is marked before seek on start (#6980) @robwalch
- Null inline class JavaScript Event callback properties on destroy (#6102) @robwalch
- Fix filtering of "mp4a.40.34" variants in Safari (#6130) @robwalch
- Fix silent AAC frame generation based on original codec (#6123) @FredZeng
- Prevent exceptions in async
xhrSetup
callback (#6459) @xta - ADTS to esds remuxing enhancements (#6627) @robwalch
- Use AAC SBR (HE-AAC) workaround on Pale Moon (#6111) @pnaf
- Fix Safari segment overlap issue by ensuring PTS order (#6132) @Asen-O-Nikolov
- Don't switch level if current already greater or equal (#6223) @corndev27
- fix:
setMediaKeys
return undefined in some browers (#6669) @JackPu - fix: assumptions in multi-drm cases where only playready is available for playback. (#6946) @cjpillsbury
- fix: tizen 2017 widevine playback (#6657) @grabofus
- Parse multiple pssh from "encrypted" init data and fix Widevine key ID extraction (#6640) @robwalch
- Prevent Widevine access request on "encrypted" w/o configured license url (#6644) @robwalch
- Prevent key errors from being emitted twice (#6704) @robwalch
- bugfix:
setAudioOption
skips track selection at index 0 (#6775) @matvp91 - Fix audio track switch where only characteristics differ (#6963) @robwalch
- Prevent loading of audio media options with the same URI as the current level (#6785) @robwalch
- Handle alternate audio switching and switched states (#6845) @robwalch
- Fix loading of audio media options with the same URI as the current level (#6887) @robwalch
- Fix reset of "ended" state after main muxed audio flush (#6921) @robwalch
- Fix back buffer not being flushed when backBufferLength is set to 0 (#6784) @tmiller02
- fix sidx parsing (#6221) @nklhtv
- Fix audio/subtitles stream controllers restarting on switch after stopped (#6227, #6245) @robwalch
- Cleanup buffer-helper functions and remove nested try-catch statements (#6228) @robwalch
- Bugfix: preferManagedMediaSource:false when MSE is not present (#6338) @Asen-O-Nikolov
- Bugfix: use part details to construct CMCD data when available (#6395) @littlespex
- Fix duplicate subtitle/captions with same NAME edge-case (#6440) @robwalch
- Fix light ESM build (#6307) @Chocobozzz
- Paused and backward seeking enhancements (#6524) @robwalch
- Fix parsing of multiple video codecs when converting from AVC1 to AVCOTI (#6533) @jhonatangcavalcanti
- Improve playlist alignment based on discontinuity sequence change (#6542) @robwalch
- Fix access of media src value with non-source children (#6615) @robwalch
- Do not split AVC samples on Access Unit Delimiter without frame data (#6617) @robwalch
- fix: drop fragment when currentLevel is undefined (#6730) @gjanblaszczyk
- Fix unregister listener typo in audio-stream-controller (#6778) @robwalch
- Bugfix: Low-Latency false starts when part selection does not match fragment (#6841) @robwalch
- Maintain startup event order with
autoStartLoad
(#6893) @robwalch - Do not adjust initPTS without accurate playlist time offset (#6922) @robwalch
- Document how to find appended sample time offsets (#6658) @fredrikj
- Update iPhone compatibility note with
ManagedMediaSource
support (#6202) @Felix212 - Correct design document stream-controller responsibilities (#6367) @neil-liu
- API.md clarify
capLevelToPlayerSize
(#6384) @andreashermann - API.md update
removeLevel
(#6267) @PavelFomin90 - API.md update CMCD
includeKeys
(#6174) @robwalch - API.md update
maxBufferHole
default (#6578) @robwalch - Add ArtPlayer logo to README (#6864) @zhw2590582
- Add rutube logo to README (#6224) @PavelFomin90
- Update artifact actions (#6099) @tjenkinson
- Update functional tests to run on Safari using MacOS 13 (#6101) @robwalch
- Update dependency update auto merge action and use GitHub auto merge (#6321) @tjenkinson
If you are upgrading from version v0.14.17 or lower, see the MIGRATING guide for API changes between v0.14.x and v1.0.0.
If upgrading from version v1.3.x or lower, the introduction of ESM exports may require changes to hls.js import statements and WebWorker setup to achieve comparable performance (https://github.com/video-dev/hls.js/issues/7106#issuecomment-2737860461).
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.6.0-rc.2
HLS.js v1.6.0-rc.2 includes bug fixes and improvements over the last release.
https://github.com/video-dev/hls.js/compare/v1.6.0-rc.1...v1.6.0-rc.2
- Added support for supplemental codec with streams that has audio and … (#7120) @timitt
- Log playback rate adjustments. (#7115) @mstyura
- Allow primary segment prefetching for interstitial resumption and exp… (#7124) @robwalch
- Fix fmp4 track timestamp alignment for non-av tracks (#7126)
- Media Playlist parser validation errors (#7119)
See the previous release candidate release notes for more v1.6 changes: https://github.com/video-dev/hls.js/releases/tag/v1.6.0-rc.1
https://9951b1e2.hls-js-dev.pages.dev/demo/
If you are upgrading from version v0.14.17 or lower, see the MIGRATING guide for API changes between v0.14.x and v1.0.0.
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.6.0-rc.1
HLS.js v1.6.0-rc.1 is a feature complete prerelease for preview and testing ahead of the v1.6.0 release.
https://github.com/video-dev/hls.js/compare/v1.6.0-beta.4...v1.6.0-rc.1
- Supplemental codecs support (#7095) @robwalch
- Fix seek during live start on low-power devices (#7063) @grabofus
- Improve Live start with slow conditions (#7076) @robwalch
- Fix loop loading of empty segment with worker disabled (#7090)
- Fix interstitial playback with media source transfer (#7077)
- Upgrade TypeScript to 5.8 with peer dependencies (#7084)
- TypeScript 5.8 and ESLint cleanup (#7099)
https://c0f457c7.hls-js-dev.pages.dev/demo/
- HLS Interstitials Support (#6591) @robwalch
- Improve support for DolbyVision profiles 8 and 10 (#7095)
- Support playback of unknown CODECS with browser mime-type support (#6620)
- #EXT-X-BITRATE support (#6843)
- AES-256 and AES-256-CTR encryption methods (#6018) @jvary
- H.265/HEVC in MPEG2-TS (#5847) @devoldemar
- CMAF KLV Metadata (set
enableEmsgKLVMetadata
totrue
to enable) (#6674) @glynd - CMCD "nor" added (#6091) @littlespex
- Improved stall detection and buffer gap handling (#6941)
- Added
config.detectStallWithCurrentTimeMs
- Added
config.nudgeOnVideoHole
- Added
config.enableInterstitialPlayback
set to false to disable Interstitial playback without turning off Interstitials parsing and events - Added
config.interstitialsController
set tonull
to disable Interstitials support completely - Added
config.interstitialAssetListLoadPolicy
defines the loading policy of X-ASSET-LIST JSON - Added
config.liveSyncOnStallIncrease
(#6455) @vk342 - Added
config.maxDevicePixelRatio
to limit browser value when capping level to media element dimensions (#6825) @signalwerk - Added
config.videoPreference.videoCodec
video codec selection preference option (#6483) - Added config options specifically for Interstitial asset player instances:
config.primarySessionId
identifies the parent player session that spawned the asset player (read fromhls.sessionId
)config.assetPlayerId
identifies logs from asset playersconfig.timelineOffset
offsets MSE appends for gapless playback
- Support
config.fetchSetup
optional async result (#6714) @zce - Added
hls.bufferedToEnd
read-only indicates when EOS has been appended (media is buffered from currentTime to end of stream) - Added
hls.bufferingEnabled
read-only flag toggled withpauseBuffering()
andresumeBuffering()
- Added
hls.hasEnoughToStart
getter returns whether enough is buffered to seek to start position (#6571) - Added
hls.inFlightFragments
- Added
hls.interstitialsManager
read-onlyInterstitialsManager
ornull
. TheInterstitialsManager
is an interface for accessing program information and methods for seeking across items and skipping Interstitials. - Added
hls.latestLevelDetails
read-onlyLevelDetails
object of the most up-to-date HLS variant Playlist data - Added
hls.loadLevelObj
read-onlyLevel
object of selected level (variant) ornull
- Added
hls.loadingEnabled
read-only flag toggled withhls.startLoad()
andhls.stopLoad()
- Added
hls.pathwayPriority
Content-Steering setting (#6295) @PavelFomin90 - Added
hls.pathways
getter (#6997) @grabofus - Added
hls.sessionId
read-onlyHls
instance UUID - used to assign a value to the _HLS_primary_id query parameter of interstitial requests - Added
hls.startPosition
read-only the resolvedstartPosition
that playback will begin at once media is appended - Support setting
hls.targetLatency
(#6473) @vk342 - Added
hls.transferMedia()
detaches and returns MediaSource and SourceBuffers non-destructively - Added
hls.url
read-only value of the currently playing url (fromhls.loadSource(url)
) (#6411) @ibobo - Added
Events.MEDIA_ENDED
event (#6141) - Added
Events.EVENT_CUE_ENTER
(for internal use) - Added
levelInfo: Level
toLevelLoadingData
andLevelLoadedData
event data - Added
track: MediaPlaylist
toTrackLoadingData
andTrackLoadedData
event data (audio and subtitle events) - Added
withoutMultiVariant: boolean
toLevelLoadedData
event - Added
LevelDetais.expired
read-only indicates live playlist data is no longer valid for fragment loading - Added
LevelDetais.requestScheduled
to improve live playlist reload scheduling - Added read-only
Fragment.bitrate
andFragment.byteLength
getters - Several
Fragment
properties have been replaced with accessors:get baseurl()
,get/set stats()
,get/set programDateTime()
. Class property accessors are not enumerable. This impacts copying object properties and serialization. - Enhancements:
hls.startLoad()
takes a second optional argument to skip seeking on start (otherwise, HLS.js seeks following to the first optionalstartPosition
argument on append)hls.attachMedia()
supports transferring MediaSource and SourceBuffers fromHls
instances withhls.transferMedia()
hls.recoverMediaError()
seeks to the value ofcurrentTime
before the source reset is performed (#6297)
- New Events:
ASSET_LIST_LOADING
when a request is made for an X-ASSET-LIST JSON objectASSET_LIST_LOADED
when a response is received for an X-ASSET-LIST JSON objectINTERSTITIALS_UPDATED
when Interstitials are added, removed, or the schedule is updated following a variant playlist update or updated asset durations from X-ASSET-LIST JSON or asset playlist and media parsingINTERSTITIALS_BUFFERED_TO_BOUNDARY
when the forward buffer reaches the boundary of the following schedule item (Interstitial event or primary segment)INTERSTITIAL_ASSET_PLAYER_CREATED
when an asset player instance is created to stream an Interstitial asset (will always be before attaching media to the asset player)INTERSTITIAL_STARTED
when streaming of an Interstitial event containing one or more assets has begun (may occur before X-ASSET-LIST JSON is loaded or playback has started)INTERSTITIAL_ENDED
when streaming of an Interstitial event containing one or more assets has ended - before resuming primary or starting the next eventINTERSTITIAL_ASSET_STARTED
when streaming of an Interstitial asset has begun (following the beginning of the event or the end of the last asset)INTERSTITIAL_ASSET_ENDED
when streaming of an Interstitial asset has ended (before the next asset or the event ending)INTERSTITIAL_ASSET_ERROR
when an error occurs starting or streaming an Interstitial asset (this can include non-fatal errors such as stalling and errors that will end streaming of the asset, resulting in the schedule advancing to the next asset or fallback to primary)INTERSTITIALS_PRIMARY_RESUMED
when playback of primary content has begun or resumed from an Interstitial eventBUFFERED_TO_END
when the last audio and video segments in the playlist have been appended (EOS signaled on all SourceBuffers)AUDIO_TRACK_UPDATED
similar to LEVEL_UPDATED fired for any update to audio group playlistsSUBTITLE_TRACK_UPDATED
similar to LEVEL_UPDATED fired for any update to subtitle group playlists
- Updated Events
MEDIA_ATTACHING
,MEDIA_ATTACHED
,MEDIA_DETACHING
, andMEDIA_DETACHED
include additional information (depending on whether media is being transferred)
- New Errors
- Type:
NETWORK_ERROR
- details:
ASSET_LIST_LOAD_ERROR
network error loading asset list - details:
ASSET_LIST_LOAD_TIMEOUT
network timeout error loading asset list - details:
ASSET_LIST_PARSING_ERROR
asset list was not valid JSON or missing required data
- details:
- type: OTHER_ERROR details:
INTERSTITIAL_ASSET_ITEM_ERROR
an issue interrupted or prevented asset playback. This will result in skipping the remainder of the asset or falling back to primary content. The eventerror
will contain more details. This type of error differs from theINTERSTITIAL_ASSET_ERROR
events forwarded from asset player errors.
- Type:
The InterstitialsController
encapsulates Interstitial functionality. It passes date range data to its scheduler to produce an array of Interstitial events and an array of event and primary items called the schedule
. The playback state across this schedule is exposed using hls.interstitialsManager
.
InterstitialsController
has:
- an
InterstitialsSchedule
which produces Interstitial events and a schedule of items on level update. TheInterstitialsSchedule
has- an array of
InterstitialEvent
objects. Each event contains properties and getters for finding its place on the playback timeline, as well as an array of interstitial assets
- an array of
- an array of
HLSAssetPlayer
instances call the player queue. EachHLSAssetPlayer
wraps a child instance ofHls
used to preload and stream Interstitial assets.
The InterstitialsController
adds a loader to the corresponding InterstitialEvent
while loading asset lists. Once the asset list request is complete, the loader is removed, and the asset list response is added to the InterstitialEvent
.
If you are upgrading from version v0.14.17 or lower, see the MIGRATING guide for API changes between v0.14.x and v1.0.0.
If upgrading from version v1.3.x or lower, the introduction of ESM exports may require changes to hls.js import statements and WebWorker setup to achieve comparable performance (https://github.com/video-dev/hls.js/issues/7106#issuecomment-2737860461).
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.6.0-beta.4
HLS.js v1.6.0-beta.4 includes bug fixes and improvements over the last release.
https://github.com/video-dev/hls.js/compare/v1.6.0-beta.3...v1.6.0-beta.4
- Interstitials Manager improvements (#7030) @matvp91 and @robwalch
- Reset asset lists after Interstitial has played (#7049) @robwalch
- Improve handling of empty ASSETS array in X-ASSET-LIST response (#7024)
- Fix primary resume time when advancing after interstitial with CUE="ONCE" (#7014)
- Make latency-controllers getters safe to call after destroyed (#7015)
- Override media-capabilities result for HEVC support in Windows Firefox (#7048)
- Fix JSON.stringify with circular dependencies (#7037) @martmol
- Replace JSON.stringify with safe stringify module (#7045) @robwalch
- Separate the calculation of the next level into a protected method (#7040) @Kouji-Koike
https://ed7009c3.hls-js-dev.pages.dev/demo/
Changes to hls.interstitialsManager
simplify timeline management and navigation:
- Added
interstitialPlayer
to get playback information likecurrentTime
andduration
across multiple assets in a break. - Removed
bufferingPlayer
,playout
, andwaitingIndex
. - Replaced
primary.seekTo
andintegrated.seekTo
withcurrentTime
setters.
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.6.0-beta.3
HLS.js v1.6.0-beta.3 includes bug fixes and improvements over the last release. These changes focus on interstitials and playback stability.
https://github.com/video-dev/hls.js/compare/v1.6.0-beta.2...v1.6.0-beta.3
- Improved Interstitial fragment loading and buffering (#7002) @robwalch
- Fix live duration override by interstitials (#6991)
- Trigger INTERSTITIALS_PRIMARY_RESUMED after ending interstitial with CUE ONCE (#6915)
- Interstitials: Fix additional asset player creation between assets at start (#6914)
- Fix Interstitial asset inline buffering with other items buffered ahead (#6913)
- Gap controller fixes (#6941) @robwalch
- Flush MSE rendering pipeline when crossing video buffer holes with audio (#6972)
- Fix seeking into and over multiple EXT-X-GAP segments (#6988)
- Make Fragment.stats enumerable (#6999)
- Split the _close method from mediaDetach (#6966) @JackPu
- Workaround Safari "ended" event not firing when EoS is marked before seek on start (#6980) @robwalch
- Fix reset of "ended" state after main muxed audio flush (#6921
- Fix audio track switch where only characteristics differ (#6963)
- Fix delta updates with discontinuity tags (#6950)
- Fix assumptions in multi-drm cases where only playready is available for playback. (#6946) @cjpillsbury
- Support HEVC VPS coming after SPS (#6940) @devoldemar
- Exclude AC3 and HEVC remuxing from light build (#6944) @robwalch
- Add shortcut for
light
version (#6925) @denisx - Do not adjust initPTS without accurate playlist time offset (#6922) @robwalch
- Replace non-null assertions in xhr-loader and gate evoking of loader callbacks (#6942)
https://e97fbb95.hls-js-dev.pages.dev/demo/
- Flush back buffer when
backBufferLength
is set to 0 (#6781) (#6784) @tmiller02 - Configure
maxDevicePixelRatio
to limit browser value (#6825) @signalwerk - Additional key-system cleanup error details (#6807) @JackPu
- #EXT-X-BITRATE support (#6843) @robwalch
- Added
config.detectStallWithCurrentTimeMs
- Added
config.nudgeOnVideoHole
- Added
hls.pathways
getter (#6997) @grabofus - Added
hls.inFlightFragments
- Added
hjs.loadLevelObj
- Added
hls.loadingEnabled
(toggled withhls.startLoad()
andhls.stopLoad()
- for internal use) - Added
Events.EVENT_CUE_ENTER
(for internal use) - Added
levelInfo: Level
toLevelLoadingData
andLevelLoadedData
event data - Added
track: MediaPlaylist
toTrackLoadingData
andTrackLoadedData
event data (audio and subtitle events) - Added
withoutMultiVariant: boolean
toLevelLoadedData
event - Added
LevelDetais.expired: boolean
readonly getter - Added
LevelDetais.requestScheduled: number
property (for internal use) - Added readonly
Fragment.bitrate
andFragment.byteLength
getters - Several
Fragment
properties have been changed to readonly getters or getter/setters:get baseurl()
,get/set stats()
,get/set programDateTime()
. This impacts serialization and extension of these properties (stats
will not be copied with spread operator orObject.assign
).
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.5.20
HLS.js v1.5.20 includes bug fixes and improvements over the last release.
https://github.com/video-dev/hls.js/compare/v1.5.19...v1.5.20
- Fix audio track switch where only characteristics differ (#6963 & 7a0ded1e72115ee24a8122a06d5b8ed0eddfb2ed fixes #6962)
https://5982f183.hls-js-dev.pages.dev/demo/
If you are upgrading from version v0.14.17 or lower, see the MIGRATING guide for API changes between v0.14.x and v1.0.0.
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.5.19
HLS.js v1.5.19 includes bug fixes and improvements over the last release.
https://github.com/video-dev/hls.js/compare/v1.5.18...v1.5.19
- Fix delta updates with discontinuity tags (#6951) @robwalch
- Fix multi-DRM cases where only PlayReady is available (#6952) @cjpillsbury
https://d5248d51.hls-js-dev.pages.dev/demo/
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.5.18
HLS.js v1.5.18 includes bug fixes and improvements over the last release.
https://github.com/video-dev/hls.js/compare/v1.5.17...v1.5.18
- Handle ManagedMediaSource endStreaming events without aborting requests (#6186) @robwalch
- Fixes #6918 by @daniemo2
- Fix null XHR response handling (#6842) @robwalch
- Fixes #5496 by @RealAlphabet
- Fix
getVideoStartPts
when timestamps wrap at MPEG-2 33-bit boundary (#6892) @robwalch- Used only in AV alignment of M2TS segments at discontiguous boundaries
https://30afa7b1.hls-js-dev.pages.dev/demo/
If you are upgrading from version v0.14.17 or lower, see the MIGRATING guide for API changes between v0.14.x and v1.0.0.
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.