Releases: video-dev/hls.js
v1.5.18
Summary
HLS.js v1.5.18 includes bug fixes and improvements over the last release.
Changes Since The Last Release
- Handle ManagedMediaSource endStreaming events without aborting requests (#6186) @robwalch
- 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
Demo Page
https://30afa7b1.hls-js-dev.pages.dev/demo/
API and Breaking Changes
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.
Feedback
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.2
Summary
HLS.js v1.6.0-beta.2 includes bug fixes and improvements over the last release. These changes focus on interstitials, live, audio-only, and stability.
Changes Since The Last Release
Additional features
- 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
Interstitial changes
- Reset
shouldPlay
on manifest loading (#6852) @matvp91 - Don't resume playback on interstitial transition after player is paused (#6905) @robwalch
- Use TextTrackCue "enter" event to improve Interstitial playback timing (#6900)
- Fallback to primary when Interstitial DateRange is removed while playing (#6894)
- Fix: Subtitles not loaded while buffering Interstitials (#6898)
- Fix transfer of media (element) while primary is re-attaching (#6903)
- Fix transfer media (source) failing when MediaSource readyState is "ended" (#6904)
Live
- Fix: Low-Latency false starts when part selection does not match fragment (#6841) @robwalch
- Wait for playlist updates before requesting segments from expired playlists (#6855)
- Re-align audio playlist with main when there is no overlap between audio playlist updates (#6857)
- Fix regressions in live playlist advancement (introduced prior to beta.1) (#6872)
- Limit live playlist reloading to scheduled updates (#6873)
- Live reload throttling per level details schedule (#6879)
- Maintain startup event order with autoStartLoad (#6893)
Audio-only
- Prevent loading of audio media options with the same URI as the current level (#6785) @robwalch
- Handle alternate audio switching and switched states (#6845)
- Fix loading of audio media options with the same URI as the current level (#6887)
- Unblock audio-only rendition loading (#6862)
Stability
- Add strict type checking for Uint8Array/ArrayBuffer (#5849) @robwalch
- Check-in on abandon rules check and abort in-flight frag when stuck on playlist loading (#6763)
- Fix:
setAudioOption
skips track selection at index 0 (#6775) @matvp91- Fixes #6774 cherry-picked to v1.5.17
- Fix unregister listener typo in audio-stream-controller (#6778)
- Program-date-time, date-range, and fragment parsing optimizations (#6811)
- Fix null XHR response handling (#6842)
- Force media capabilities check for HEVC to avoid failure on Windows (#6849)
- Fragment 4xx network error handling improvements (#6853)
- Fix
getVideoStartPts
when timestamps wrap at MPEG-2 33-bit boundary (#6892) - Fixes for regressions in development introduced after beta.1:
README
- Add ArtPlayer Integration (#6864) @zhw2590582
Demo Page
https://17368332.hls-js-dev.pages.dev/demo/
API and Breaking Changes
- 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
).
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.
Feedback
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.5.17
Summary
HLS.js v1.5.17 includes bug fixes and improvements over the last release.
Changes Since The Last Release
Demo Page
https://ea9762d3.hls-js-dev.pages.dev/demo/
Feedback
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.1
Summary
HLS.js v1.6.0 includes support for HLS Interstitials. HEVC in MPEG2-TS has been adopted based on popular demand.
Live playback fixes improve stability and join time. Target latency is settable. Low-latency part fetching will transition seamlessly to full segment fetching when playback is far back enough not to benefit from part loading.
API enhancements for Interstitials allow the MediaSource to be transitioned between Hls
instances. This can be used to achieve gapless playback between items when combined with timelineOffset
.
API Enhancements
- Added MEDIA_ENDED event (#6141) @robwalch
- Resolves Getting BufferStalledError on Safari (#5274) @leaofelipe
- Add
liveSyncOnStallIncrease
config option (#6455) @vk342 - Support setting
targetLatency
(#6473) @vk342 - Add public url getter to return the currently playing url (#6411) @ibobo
- Add
videoCodec
field tovideoPreference
options (#6483) @robwalch - Content-Steering
pathwayPriority
getter/setter added (#6295) @PavelFomin90
Design Details
The InterstitialsController
handles HLS and media input and events for the primary HLS asset. It passes date range data to the scheduler to produce an array of Interstitial events and an array of event and primary items called the schedule. 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 responsibility of loading asset lists. The
InterstitialsController
adds a loader to the correspondingInterstitialEvent
while loading. The loader is removed and replaced by the asset list response once the request is complete. - the responsibility of scheduling Interstitial playback and maintaining the current playing and buffering schedule items and assets. The schedule advances according to primary currentTime changes on timeupdate and seeking events, advancement of the combined buffer on media append, and asset playback and buffer advancement and completion.
Configuration options
- Interstitials parsing and playback are enabled via config option
interstitialsController
. Setting this to null turns off Interstitial parsing and playback. - To turn off Interstitial playback without removing parsing or schedule updates and buffered-to events, set config option
enableInterstitialPlayback
tofalse
(allowing for custom playout and ad managers) - Config option
interstitialAssetListLoadPolicy
defines the loading policy of X-ASSET-LIST JSON - Several config options have been added specifically for Interstitial asset player instances:
primarySessionId
identifies the parent player session that spawned the asset player (read fromhls.sessionId
)assetPlayerId
is used to identify logs from asset playerstimelineOffset
is used to offset MSE appends of Interstitial content (not all Interstitial assets are appended inline at offsets; most require a MediaSource reset)
New top-level API on Hls
instances
bufferedToEnd
getter returns a boolean indicating if EOS has been appended (media is buffered from currentTime to end of stream)bufferingEnabled
getter returns a boolean indicating whether fragment loading has been toggled with pauseBuffering() and resumeBuffering()interstitialsManager
getter returns anInterstitialsManager
(or null). TheInterstitialsManager
is an interface that provides access to Interstitial program and timeline data as well as methods for seeking across items and skipping Interstitial events.latestLevelDetails
getter returns theLevelDetails
of the most up-to-date HLS variant Playlist datasessionId
getter returns the session UUID assigned to theHls
instance- The
sessionId
value is used when assigning a _HLS_primary_id query parameter to interstitial requests
- The
startLoad()
now includes a second optional argument to skip seeking on start (otherwise, HLS.js seeks following to the first optionalstartPosition
argument on append)hasEnoughToStart
getter returns whether enough is buffered to seek to start position (#6571)startPosition
getter returns the resolvedstartPosition
that playback will begin at once media is appendedtransferMedia()
method detaches and returns MediaSource and SourceBuffers non-destructivelyurl
getter returns the URL resolved from loadSource(url)
Updated top-level API on Hls
instances
attachMedia()
enhancements for transferring MediaSource and SourceBuffers betweenHls
instancesrecoverMediaError()
now seeks to the value ofcurrentTime
before the source reset is performed (#6297)
New Events for Interstitials
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 for Interstitials
- 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.
Changes Since The Last Release
New Features
- HLS Interstitials Support (#6591) @robwalch
- Fixes (#5730)
- Resolves playback stuck with no audio-video buffer overlap (#6571) @JackPu
- Resolves always honor config.startPosition when attaching(recovering) (#6297) @kedanielwu
- DateRange parsing and validation enhancements for Interstitials (#6213) @robwalch
- Resolves EXT-X-DATERANGE metadata synchronisation vs video stream in presence of frequent EXT-X-DISCONTINUITYs (#6203) @lnstadrum
- Move hash function into utils (#6503) @robwalch
fetchSetup
config optional async support (#6714) @zce- Improve support of unknown CODECS (#6620) @robwalch
- Instead of filtering out variants with unknown codecs, determine if codec is audio or video based on passing
isTypeSupported
check
- Instead of filtering out variants with unknown codecs, determine if codec is audio or video based on passing
- Adding AES-256 and AES-256-CTR encryption methods (#6018) @jvary
- Support for H.265/HEVC in MPEG2-TS (#5847) @devoldemar
- Support for H.265/HEVC in MPEG2-TS (#4943) @u93
- Unsupported HEVC in M2TS found (#6334) @wangyong991
- Play error stream MPEG-H Part2/HEVC (H.265) (hevc) (#6112) @zsahome
- Do not include HEVC in TS support in hls.light (#6194) @robwalch
- Fix PPS array growth in HEVC TS parser (#6724) @devoldemar
- MPEG2-TS: Fix extraction of NALu overflowing PES packet (#6268) @devoldemar
- Add support for CMCD nor (#6091) @littlespex
- CMAF KLV support via Metadata callback (set
enableEmsgKLVMetadata
totrue
to enable) (#6674) @glynd
Enhancements
v1.5.16
Summary
HLS.js v1.5.16 includes bug fixes and improvements over the last release.
Changes Since The Last Release
- Bugfix: Content Steering start with one pathway switches to cloned pathway variants (#6760) @robwalch
- Resolves #6759 @cheluskin
Demo Page
https://37c2c81d.hls-js-dev.pages.dev/demo/
Feedback
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.5.15
Summary
HLS.js v1.5.15 includes bug fixes and improvements over the last release.
Changes Since The Last Release
- Parse multiple pssh from "encrypted" init data and fix Widevine key ID extraction for playlist match (#6640) @robwalch
- Fixes #6636
- Update test case to use Github Pages url (#6643) @ayellapragada
Demo Page
https://4e4dc178.hls-js-dev.pages.dev/demo/
Feedback
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.5.14
Summary
HLS.js v1.5.14 includes bug fixes and improvements over the last release.
Changes Since The Last Release
- Fix access of media src value with non-source children (#6611) @jhonatangcavalcanti
Demo Page
https://54b0b8e6.hls-js-dev.pages.dev/
Feedback
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.5.13
Summary
HLS.js v1.5.13 includes bug fixes and improvements over the last release.
Changes Since The Last Release
HLS.js changes:
- Fix parsing of multiple codecs when converting from AVC1 to AVCOTI (#6533) @jhonatangcavalcanti
- Fix
reduceMaxBufferLength
with under-reported bitrate (#6539) @robwalch
Demo Page changes:
- Fix XSS vulnerability by validating user input stream URL (#6538) @yemaw
- Resolves #5606 by @JesseClarkND
Demo Page
https://7e3969ad.hls-js-dev.pages.dev/demo/
Feedback
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.5.12
Summary
HLS.js v1.5.12 includes bug fixes and improvements over the last release.
Changes Since The Last Release
Demo Page
https://001e7642.hls-js-dev.pages.dev/demo/
Feedback
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.
v1.5.11
Summary
HLS.js v1.5.11 includes bug fixes and improvements over the last release.
Changes Since The Last Release
Demo Page
https://f7ddc5db.hls-js-dev.pages.dev/demo/
Feedback
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.