This guide provides an overview to migrating an application using hls.js from v0.14.x to v1.0.0.
Promise support is now required. Please bring your own polyfill.
cleared by hls.js than leaving it up to the browser. Set backBufferLength
backBufferLength
default of 90 seconds applies to Live and VOD streams.liveBackBufferLength
is still supported but marked as deprecated. Back buffer on VOD content will be toInfinity
and the deprecatedliveBackBufferLength
to 90 to enforce the old behavior.lowLatencyMode
- set tofalse
to disable Low-latency part loading and target latency playback rate adjustmentprogressive
- (experimental) set totrue
to stream and append loaded audio and video data before each segment load completion. Not recommended for production or small segments with only a single GoP or less.
hls.audioTracks
andhls.subtitleTracks
as well asAUDIO_TRACKS_UPDATED
andSUBTITLE_TRACKS_UPDATED
events only list tracks in the active level's audio/sub GROUP-ID afterLEVEL_LOADING
(this will go unnoticed for streams with no or only one group per track type)- The
MANIFEST_PARSED
event still reports all tracks when multiple GROUP-ID values are present. Applications that used that event to get tracks would need to be updated in v1 to switch to the corresponding track update events to select available tracks using the available indexes. - Track ids are no longer indexes of the complete list of audio or subtitle tracks. They are now indexes within each group. So six tracks in two groups that had ids 0,1,2,3,4,5 will now have ids 0,1,2,0,1,2. This allows for tracks to be changed by index/id within the range of available tracks as they were before.
- The
- Added
groupId
to audio and subtitle track loading and loaded events
- Setting
hls.currentLevel
no longer pauses the media element while clearing the buffer and loading the new level. This can result in a stall error if playback doesn't start within a quarter of a second. Applications implementing manual quality switching withhls.currentLevel
that do not want a stall reported should either pause or setvideo.playbackRate
to0
until the level switch is complete.
Event order and content have changed in some places. See Breaking Changes below, and please report any issues with breaking changes that impact your integrations
FRAG_LOADED
fires after events handled on progress which can include everything up to appending a fragment if workers are disabled (more details below under Known Issues)BUFFER_CODECS
data has changed from{ tracks: { video?, audio? } }
to simply{ video?, audio? }
BUFFER_APPENDING
data has changed from{ type, data, parent, content }
to{ type, data, frag, chunkMeta }
BUFFER_APPENDED
data has changedFRAG_DECRYPT_ERROR
events are now surfaced as aFRAG_PARSING_ERROR
along with other fragment transmuxing errors- Added additional error details to help identify the source of certain network error events:
SUBTITLE_LOAD_ERROR
SUBTITLE_TRACK_LOAD_TIMEOUT
UNKNOWN
- The
stats
object has changedtrequest
,tfirst
,tload
have been replaced byloading: HlsProgressivePerformanceTiming
tparsed
has been replaced byparsing: HlsProgressivePerformanceTiming
- On the
Fragment
object:hasElementaryStream
function has been removedsetElementaryStream
and_elementaryStreams
have been renamed (these are only for internal use)
- FRAG____ events are now fired for LL-HLS part events with a
part
property that include the part details.