github video-dev/hls.js v1.0.0-rc.3

latest releases: v1.5.8, v1.5.7, v1.5.6...
pre-release3 years ago

This is a preview release of version 1.0. It is feature complete and intended for testing purposes.

Changes Since Last Release

v1.0.0-rc.2...v1.0.0-rc.3

  • Fix an issue that causes DISCONTINUITY values to be reassigned incorrectly #3567
  • Prevent back-buffer eviction callback from resetting active segment requests #3556 - Resolves #3564
    • Set stream controller state to IDLE when fragment loading/parsing/appending is aborted or fails
    • Evict back-buffer on FRAG_CHANGED at TARGET_DURATION intervals making fewer MSE remove requests
    • Emit FRAG_CHANGED on part change and fix other methods relying on getAppendedFrag for ranges where only parts were buffered - Resolves #3530
    • Only emit LIVE_BACK_BUFFER_REACHED in live streams
  • Fix live fragment finder logic #3540 - Resolves #3528
  • Apply the Hls API instance context to event listeners instead of using the default event emitter #3536 - Resolves #3535

New Features

  • Apple Low-Latency HLS support
  • Improved support for redundant variants with tracks
  • Improved audio and subtitle track selection with multiple media and stream variants containing different GROUP-ID values
  • Progressive streaming option (experimental)
  • Basic IMSC1 support (experimental)

API Changes

  • New config options:

    • backBufferLength config applies to Live and VOD content. liveBackBufferLength is still supported but marked as deprecated.
    • lowLatencyMode - set to false to disable Low-latency part loading and target latency playback rate adjustment
    • progressive- (experimental) set to true 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.
  • 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

  • hls.audioTracks and hls.subtitleTracks as well as AUDIO_TRACKS_UPDATED and SUBTITLE_TRACKS_UPDATED events only list tracks in the active level's audio/sub GROUP-ID after LEVEL_LOADING - #3293

  • Added groupId to audio and subtitle track loading and loaded events

  • Added additional error details to help identify the source of certain network error events:

    • SUBTITLE_LOAD_ERROR
    • SUBTITLE_TRACK_LOAD_TIMEOUT
    • UNKNOWN
  • The FRAG_DECRYPT_ERROR event is no longer emitted and is instead surfaced as a FRAG_PARSING_ERROR

Breaking Changes

  • Promise support is now required. Please bring your own polyfill
  • The stats object has changed
    • trequest, tfirst, tload have been replaced by loading: HlsProgressivePerformanceTiming
    • tparsed has been replaced by parsing: HlsProgressivePerformanceTiming
  • On the Fragment object:
    • hasElementaryStream function has been removed
    • setElementaryStream and _elementaryStreams have been renamed (these are only for internal use)
  • 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 changed
  • FRAG_DECRYPT_ERROR events are now surfaced as a FRAG_PARSING_ERROR along with other fragment transmuxing errors
  • Event binding should remain unchanged using the public API, but refer to #2395 if experiencing an issue with changes to event constants.
  • As mentioned in API changes, hls.audioTracks and hls.subtitleTracks as well as AUDIO_TRACKS_UPDATED and SUBTITLE_TRACKS_UPDATED events only list tracks in the active level's audio/sub GROUP-ID after LEVEL_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.
  • 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 with hls.currentLevel that do not want a stall reported should either pause or set video.playbackRate to 0 until the level switch is complete.
  • The new backBufferLength default of 90 seconds applies to Live and VOD streams. As a result, the back buffer on VOD content will be cleared by hls.js than leaving it up to the browser. Set backBufferLength to Infinity and the deprecated liveBackBufferLength to 90 to enforce the old behavior.

Known Issues

  • A change in texttrack-utils can cause the tab to freeze
  • TTFB is factored into overall bandwidth and can impact quality selection when streaming smaller segments or LL-HLS parts #3563

Summary

Demo Page

https://hls-js-783b9d6a-cfe1-4fe0-babe-ddf2cab3adbe.netlify.app/demo/

Feedback

To provide feedback please a bug report or feature request via the issue tracker.

If you do file an issue, please include a test stream, and consider contributing to #3065.

If you notice additional breaking changes, please comment in #3532.

Don't miss a new hls.js release

NewReleases is sending notifications on new releases.