video-dev/hls.js
 Watch   
 Star   
 Fork   
2024-10-18 05:25:21
hls.js

v1.5.17

Summary

HLS.js v1.5.17 includes bug fixes and improvements over the last release.

Changes Since The Last Release

https://github.com/video-dev/hls.js/compare/v1.5.16...v1.5.17

  • Fixed: setAudioOption skips track selection at index 0 (cherry-picked from #6775) @matvp91

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.

2024-10-10 23:50:31
hls.js

v1.6.0-beta.1

Summary

HLS.js v1.6.0-beta.1 includes bug fixes and improvements over the last release.

Changes Since The Last Release

https://github.com/video-dev/hls.js/compare/v1.5.16...v1.6.0-beta.1

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
  • 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
      • Fixes Memory leaks during playback of HEVC / H.265 / HEV1 / HVC1 HLS stream packaged into MPEG-TS (.ts files) (#6683) @izogfif
    • MPEG2-TS: Fix extraction of NALu overflowing PES packet (#6268) @devoldemar
      • Fix decode error escape in dev (Transport Stream) (#6492) @robwalch
  • Add support for CMCD nor (#6091) @littlespex
  • CMAF KLV support via Metadata callback (set enableEmsgKLVMetadata to true to enable) (#6674) @glynd

Enhancements

  • Low-Latency HLS:
    • Switch between part and fragment loading at start and on segment boundaries (#6170) @robwalch
    • Skip Low-Latency HLS segment and part directives after long delay (#6080) @robwalch
  • Improve playlist alignment based on discontinuity sequence change (#6542) @robwalch
    • Question about playlists alignment based on discontinuity counter (#4416) @hongfeih-es
  • Reduce workers across instances (#6550) @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
    • Fix audio segment loading when main segments loaded out of sequence (#6537) @robwalch
  • Log parsed segment timestamps ahead of append (#6549) @robwalch
  • Lazy init CEA608 parsers (#6127) @robwalch
  • Null inline class JavaScript Event callback properties on destroy (#6102) @robwalch
  • Use average for level sorting and abandon rules check (#6135) (#6146) @robwalch
  • Use WebCrypto by default for AES decryption (#6015) @robwalch
  • Trigger ATTACH_MEDIA_ERROR when calling attachMedia with falsey media argument (#6556) @agajassi
    • Resolves Improve Error Handling for "attachMedia" with Null (#6463) @fullmooooon
  • Module export improvements:
    • Avoid re-exporting enums with "export type" (#5685) @ericmatthys
    • Add loaders and other modules used in config to ESM output (#6733) @robwalch
      • Resolves FetchLoader export Question (#6707) @austinh
    • Support TypeScript Node16/NodeNext module resolution (#6616) @robwalch
  • chore: update all type imports to explicitly use the type keyword. (#6332) @cjpillsbury
  • Build improvements:
    • Rollup 4 (#5886) @tjenkinson
  • Remove unused method remuxEmptyAudio (#6534) @robwalch
  • Integrate SVTA Common Media Library's ID3 utilities (#6260) @felipeYoungi
    • Resolves (#6168)
  • Don't switch level if current already greater or equal using CapLevelController (#6223) @corndev27
  • Ensure media element references are removed after calling detachMedia (#6249) @robwalch
  • Cleanup buffer-helper functions and remove nested try-catch statements (#6228) @robwalch

Bug Fixes (Misc)

  • Align live playlist updates to end of last when there is no overlap (#6692) @robwalch
    • Resolves: jump back while play live stream (#6685) @jprorikon
    • Resolves: Live stream occasionally jumps back to earlier progress with slow internet speed (#5282) @AkiDroid
  • Drop fragment when currentLevel is undefined on progress (#6730) @gjanblaszczyk
  • Paused and backward seeking enhancement (#6524) @robwalch
    • Seeking to a previous frame, which is the last frame of the previous segment, hangs or seeks incorrectly (#6511) @tpazman
    • Seeking to the end of a fragment while paused stalls (#6331) @0sten
    • Seeking breaks stream with DISCONTINUITY (#4905) @periman2
    • Seeking performance issues in Safari (visible in hls.js demo w/ Buffer stalled error) (#4884) @cmugla
  • EME: Prevent key errors from being emitted twice (#6704) @robwalch
    • Fixes: Emit keySystemLicenseRequestFailed twice if we block the license (#6701) @JackPu
  • EME: setMediaKeys return undefined in some browers (#6669) @JackPu
  • EME: tizen 2017 widevine playback (#6657) @grabofus
  • EME: Prevent Widevine access request on "encrypted" w/o configured license url DRM (#6644) @robwalch
  • MPEG2-TS: Do not split AVC samples on Access Unit Delimiter without frame data (#6617) @robwalch
    • Fixes: 使用hls.js播放hls时,视频出现了花屏 (#6515) @xht
  • MPEG2-TS remux: Retain PTS order to avoid MEDIA_ERR_DECODE in Safari with segment overlap (#6132) @Asen-O-Nikolov
  • Fix duplicate subtitle/captions with same NAME edge-case (#6440) @robwalch
    • Fixes: Duplicate Captions for MP4 Content (#6392) @wildg-ensemble
  • Fix audio/subtitles stream controllers restarting on switch after stopped (#6227) @robwalch
    • Clean up base-stream-controller (#6245) @robwalch
  • Bugfix: use part details to construct CMCD data when available (#6395) @littlespex
    • Fixes: CMCD "nor" and "d" should return part details during Low-Latency HLS streaming (#6388) @robwalch
  • ADTS to esds remuxing enhancements (#6627) @robwalch
    • Replaces: Use AAC SBR (HE-AAC) workaround on Pale Moon (#6111) @pnaf
      • Resolves: Malformed sound on Pale Moon (#6110) @pnaf
  • Fix: generate silent AAC frame based on original codec (#6123) @FredZeng
  • Fix filtering of "mp4a.40.34" variants in Safari (#6130) @robwalch
    • Fixes: Safari Version 17.2.1 (19617.1.17.11.12) on macOS Sonoma 14.2.1 (23C71) doesn't support mp4a.40.34 (#6125) @piannone
  • Use unique logger configurations across instances (#6131) @robwalch
    • Resolves Multiple Hls instances share debug/logger configuration (#2461) @adriangodong
  • Don't pass log functions with player id to global logger (#6242) @robwalch

Documentation Fixes

  • Document appended timestamp offset (#6658) @fredrikj
    • Resolves frame accurate seeking (#6649)
  • Update API.md to reflect maxBufferHole v1.0 default (#6578) @robwalch
  • Clarify capLevelToPlayerSize docs in API.md (#6384) @andreashermann
  • Update design.md: stream-controller.ts triggers BUFFER_RESET on MANIFEST_LOADING (#6367) @neil-liu
    • Resolves Documentation error on "stream-controller.ts" in "design.md" under "docs" folder Documentation (#6366)
  • rutube logo for 'they use' section (#6224) @PavelFomin90

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 to videoPreference options (#6483) @robwalch
    • Fix selection codec contstraint (#6500) @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. The InterstitialsSchedule 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 HLSAssetPlayer instances call the player queue. Each HLSAssetPlayer wraps a child instance of Hls used to preload and stream Interstitial assets.
  • the responsibility of loading asset lists. The InterstitialsController adds a loader to the corresponding InterstitialEvent 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 to false (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 from hls.sessionId)
    • assetPlayerId is used to identify logs from asset players
    • timelineOffset 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 an InterstitialsManager (or null). The InterstitialsManager 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 the LevelDetails of the most up-to-date HLS variant Playlist data
  • sessionId getter returns the session UUID assigned to the Hls instance
    • The sessionId value is used when assigning a _HLS_primary_id query parameter to interstitial requests
  • startLoad() now includes a second optional argument to skip seeking on start (otherwise, HLS.js seeks following to the first optional startPosition argument on append)
  • hasEnoughToStart getter returns whether enough is buffered to seek to start position (#6571)
  • startPosition getter returns the resolved startPosition that playback will begin at once media is appended
  • transferMedia() method detaches and returns MediaSource and SourceBuffers non-destructively
  • url getter returns the URL resolved from loadSource(url)

Updated top-level API on Hls instances

  • attachMedia() enhancements for transferring MediaSource and SourceBuffers between Hls instances
  • recoverMediaError() now seeks to the value of currentTime 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 object
  • ASSET_LIST_LOADED when a response is received for an X-ASSET-LIST JSON object
  • INTERSTITIALS_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 parsing
  • INTERSTITIALS_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 event
  • INTERSTITIAL_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 event
  • BUFFERED_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 playlists
  • SUBTITLE_TRACK_UPDATED similar to LEVEL_UPDATED fired for any update to subtitle group playlists

Updated Events

  • MEDIA_ATTACHING, MEDIA_ATTACHED, MEDIA_DETACHING, and MEDIA_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
  • 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 event error will contain more details. This type of error differs from the INTERSTITIAL_ASSET_ERROR events forwarded from asset player errors.

Build Constants

  • Interstitials is removed from the hls.light.js build by the __USE_INTERSTITALS__ build const/directive.

Demo Page

https://3c9be857.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.

2024-10-09 06:17:53
hls.js

v1.5.16

Summary

HLS.js v1.5.16 includes bug fixes and improvements over the last release.

Changes Since The Last Release

https://github.com/video-dev/hls.js/compare/v1.5.15...v1.5.16

  • 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.

2024-08-22 09:14:14
hls.js

v1.5.15

Summary

HLS.js v1.5.15 includes bug fixes and improvements over the last release.

Changes Since The Last Release

https://github.com/video-dev/hls.js/compare/v1.5.14...v1.5.15

  • 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.

2024-08-06 03:01:40
hls.js

v1.5.14

Summary

HLS.js v1.5.14 includes bug fixes and improvements over the last release.

Changes Since The Last Release

https://github.com/video-dev/hls.js/compare/v1.5.13...v1.5.14

  • 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.

2024-07-04 05:39:19
hls.js

v1.5.13

Summary

HLS.js v1.5.13 includes bug fixes and improvements over the last release.

Changes Since The Last Release

https://github.com/video-dev/hls.js/compare/v1.5.12...v1.5.13

HLS.js changes:

  • Fix parsing of multiple codecs when converting from AVC1 to AVCOTI (#6533) @jhonatangcavalcanti
  • Fix reduceMaxBufferLength with under-reported bitrate (#6539) @robwalch
    • Resolves #6535 by @mbUSC

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.

2024-07-02 01:40:24
hls.js

v1.5.12

Summary

HLS.js v1.5.12 includes bug fixes and improvements over the last release.

Changes Since The Last Release

https://github.com/video-dev/hls.js/compare/v1.5.11...v1.5.12

  • Fix: Reduce max buffer length (#6530) @robwalch

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.

2024-06-05 02:22:41
hls.js

v1.5.11

Summary

HLS.js v1.5.11 includes bug fixes and improvements over the last release.

Changes Since The Last Release

https://github.com/video-dev/hls.js/compare/v1.5.10...v1.5.11

  • Fix error handling for GAP tags in subtitle and audio playlists (#6478) @robwalch

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.

2024-06-04 02:17:37
hls.js

v1.5.10

Summary

HLS.js v1.5.10 includes bug fixes and improvements over the last release.

Changes Since The Last Release

https://github.com/video-dev/hls.js/compare/v1.5.9...v1.5.10

  • Fix light ESM build (#6307) @Chocobozzz
  • Fix errors (#6201) related to xhrSetup (#6459) @xta
  • Prevent overlapping appends on start not present in v1.4.x (#6471) @robwalch
    • Workaround for (#6441) reported by @tvinko
  • Fix HE-AACv1 and v2 in fMP4 on iOS (#6472) reported by @InstabilSpielt
  • Fix unsupported EC-3 in TS parsing error handling in sync path (#6469)
    • Fix for improper error handling (#6447) reported by @accedo-robcc

Demo Page

https://56631b07.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.

2024-05-29 07:42:05
hls.js

v1.5.9

Summary

HLS.js v1.5.9 includes bug fixes and improvements over the last release.

Changes Since The Last Release

https://github.com/video-dev/hls.js/compare/v1.5.8...v1.5.9

  • Fix missing details if subtitle changed synchronously after loaded and before onLoaded callback (#6424) @iamboorrito
  • Fix: Handle irregular white-space in segment URIs (#6396) @robwalch
  • Fix backtracking when an appended segment has no buffered timerange (#6434)
  • Fix 608 parser handling of redundant control codes (Fixes #6427)
  • Fix 608 caption TextTrack Cue seek/discontinuity timing (regression introduced in v1.5.0 with #5557)
  • Fix JS AES fallback when browserCrypto.subtle returns undefined (rather than null) (#6446)
  • Emit FRAG_PARSING_ERROR on unsupported M2TS codec (#6447)

Demo Page

https://978f0c41.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.