CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
v1.6.0-rc.1
Pre-releaseCompare
f70ecdc
Summary
HLS.js v1.6.0-rc.1 is a feature complete prerelease for preview and testing ahead of the v1.6.0 release.
Changes since the last release
- Supplemental codecs support (#7095) @robwalch
- Fix seek during live start on low-power devices (#7063) @grabofus
- 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)
Demo page
https://c0f457c7.hls-js-dev.pages.dev/demo/
New features in release version 1.6
- 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)
API changes in release version 1.6
- 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:
Design details
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
.
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.
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 (#7106 (comment)).
Feedback
Please provide feedback via Issues in GitHub. For more details on how to contribute to HLS.js, see our CONTRIBUTING guide.