Notes
Documentation
With version 5.0.0 we are also introducing a dedicated documentation page for dash.js: https://dashif.org/dash.js/ . It walks you through the setup and includes detailed information on how to use the various dash.js features. Most of the documentation is part of the Usage
section.
Migration from v4 to v5
dash.js version 5.0.0 introduces changes to the build files, settings and the APIs. Our new documentation page contains a migration guide to help you upgrade from v4 to v5: https://dashif.org/dash.js/pages/developers/migration-guides/4-to-5.html . Please let us know if you encounter any issues.
Build files
With version 5 of dash.js we introduced three different bundle formats:
UMD legacy
: AUMD
build targeting legacy platforms by specifying the babel targetie: '11'
. In addition,
core.js
polyfills are enabled.ESM modern
: AnESM
build using.browserslistrc
as target, with target set todefaults
. Nocore.js
polyfills are enabled.UMD modern
: AUMD
build targeting modern platforms using.browserslistrc
as target, with target set to
defaults
. Nocore.js
polyfills are enabled.
All the bundled files are located in the dist
directory of the repository. The legacy
folder inside the dist
folder contains the UMD legacy
build. The modern
folder inside the dist
folder contains both the ESM modern
and
the UMD modern
build.
The following entry points are defined in the package.json
:
{
"types": "./index.d.ts",
"import": "./dist/modern/esm/dash.all.min.js",
"default": "./dist/modern/esm/dash.all.min.js",
"browser": "./dist/modern/umd/dash.all.min.js",
"script": "./dist/modern/umd/dash.all.min.js",
"require": "./dist/modern/umd/dash.all.min.js"
}
Features
-
[4180] Adds tXml as the new XML parser to speed up parsing time especially for long SegmentTimeline manifest files by @bbert
-
[4237] Adds new throughput calculation modes and support for the Resource Timing API and the Network Information API by @dsilhavy
-
[4276] Adds support for the SupplementalProperty “urn:mpeg:adaptation-set-switching:2016”. This allows dash.js to adapt between Representations of different AdaptationSets. by @dsilhavy
-
[4562] Adds handling of keystatuseschange events. If a key is not usable (internal-error or output-restricted) the player switches to a different track. In case of AdaptationSet Switching (urn:mpeg:dash:adaptation-set-switching:2016) the unsupported Representations are removed from the list of possible options. by @dsilhavy
-
[4578] Add basic support for UrlQueryInfo and ExtUrlQueryInfo as defined in Annex I of the DASH specification @JoaquinBCh @sebastianpiq
-
[4299] Add support for network request and network response interceptors using CommonMediaRequest and CommonMediaResponse classes defined in the SVTA Common Media Library @bbert
-
[4380] Add support for “@ref” and “@refid” in ContentProtection elements @dsilhavy
-
[4418] Adds a new functional testsuite including many additional tests e.g. for initial audio, initial text and gap handling. @dsilhavy
-
[4391] Parse ID3 payload for inband events @littlespex
-
[4419] Add support for the CTA-WAVE Common Access Token @dsilhavy
-
[4426] Add support for CMCD initialization and configuration coming from the MPD as specified in MPEG-DASH v6 @matiasrb97 @santiagomintegui @N1Knight
-
[4426] Add support for sending CMCD data to a content steering server @matiasrb97 @santiagomintegui @N1Knight
-
[4485] Add new timing related APIs as documented here @dsilhavy
-
[4491] MPEG-5 Part 2 LCEVC SEI Integration into dash.js @v-nova-vinod
-
[4548] Add support for filterting unsupported Representations based on the DRM capabilities using the Media Capabilities API @dsilhavy
-
[4559] Implements custom Karma launchers for WebOS and Tizen to execute functional tests on SmartTVs @dsilhavy
-
[4585, 4610] Add support for scte214:supplementalCodecs @gmcgarry
-
[4603] Add support for CMCD v2 keys “ltc” and “msd” @JoaquinBCh @sebastianpiq
-
[4627, 4659] Adjust the build configuration to output different UMD and ESM bundles. @dsilhavy
-
[Link, 4645] Add a new documentation website to document how to use dash.js and the various dash.js features @dsilhavy
Improvements
-
[4385, 4411] Enhance handling of Essential Properties by allowing the registration of Essential Properties that should be known to the capabilities check. @stschr
-
[4661] Adds a new setting deleteEventMessageDataAfterEventStarted set to true by default. If this flag is enabled, the EventController will delete the messageData and the parsedMessageData of events after they have been started. This is to save memory in case events have a long duration and need to be persisted in the EventController for a while to not be retriggered. @dsilhavy
-
[4471] Add mapping of HDR EssentialProperty descriptors to Media Capabilities API queries @stschr
-
[4660] Update typings in the Typescript definition @ShikiSeiren
-
[4522] Integrates the CTA 608 parser from the SVTA Common Media Library @agajassi
-
[4351] Refactor the CMSD implementation to use the Common Media Library @littlespex
-
[4299] Integration of CommonMediaRequest and CommonMediaResponse interfaces from the SVTA Common Media Library. @bbert
-
[4551] Enables switching between Representations of different AdaptationSets using setRepresentationForTypeById() @dsilhavy
-
[4600] Add synthetic stalls @tom-coward
-
[4564] Optimize MediaCapabilitiesAPI checks by saving the results and only running new checks when the configuration has not been tested before. This avoids calling the MediaCapabilitiesAPI after each MPD update to filter unsupported tracks and qualities. @dsilhavy
-
[4575] This PR optimizes the codec support check using the Media Capabilities API. Each specific codec configuration (codec string, width, height, bitrate, framerate, keySystemConfiguration) is checked only once. The decodingInfo is saved and persisted until the player object is destroyed @dsilhavy
-
[4524] Optimize switch between codecs by using changeType() if available @dsilhavy
-
[4562] Only apply changeType() if the codec family has not changed. For instance, if we are switching between avc1 and avc3 we dont need to call changeType(). @dsilhavy
-
[4524] Optimize sorting or Representations by using qualityRanking and pixels per second. @dsilhavy
-
[4594, 4595] Take the segment duration into account when checking if a new request shall be scheduled. @dsilhavy
-
[4276] Rework ABR handling to use Representation IDs instead of indices @dsilhavy
-
[4206] Replace internal CMCD utilities with SVTA CML CMCD utilities @littlespex
-
[4237] Refactoring of the ABR classes and the related settings structure @dsilhavy
-
[4250] Updates to the handling of Descriptor Type elements @stschr
-
[4259] Update bcp-47 dependencies to latest, ESM-only version @stschr
-
[4597] Add examples for Webpack and Typescript usage @dsilhavy
-
[4369] Improve the AbandonRequestsRule.js by using traces from progress event @dsilhavy
-
[4373] Refactor the InsufficientBufferRule.js and allow parameter configuration via Settings.js @dsilhavy
-
[4378] Refactor the DroppedFramesRule.js and allow parameter configuration via Settings.js @dsilhavy
-
[4453] Change custom capabilities filter to accept async functions @stschr
-
[4379] Refactor the SwitchHistoryRule.js and allow parameter configuration via Settings.js @dsilhavy
-
[4625] Account for cases in which no license for the currently selected KID is returned by the license server @dsilhavy
-
[4398] Adjust deploy action to use node.js version 18 @dsilhavy
-
[4406] Add ECCP samples from LiveSim2 and fix ECCP bugs @dsilhavy
-
[4417] Correctly translate XML entities and character references @Andrews54757
-
[4460] Account for lower case laUrl signaling in the MPD @dsilhavy
-
[4470] Remove unnecessary jshint ignore:line comment @dsilhavy
-
[4486] Update URLs to livesim2 streams for MPD patching @dsilhavy
-
[4500] Updating the reference-UI to expose audio-accessibility as option @stschr
-
[4576] Adds the ability to set initial media settings using ID and filter tracks by their id. @Kalynov
-
[4593] Do not allow switching to a track that has an unusable key @dsilhavy
-
[4629] Add a settings flag to ignore the keystatusmap @dsilhavy
-
[4646] Upgrade to CML version 0.7.4 @littlespex
-
[4658] Add a workaround for SegmentTimeline manifests for which there is no valid segment request to be found when seeking to the very end. @dsilhavy
-
[4671] Add an example on how to import the MSS build file @dsilhavy
-
[4675] Fix a small memory leak when playing live multi-period stream @tea
-
#4682 Propagate Properties common to all Representations to MediaInfo @stschr
Bugfixes
-
[4403] Fix HTTPLoader in order to apply network response interceptors in all use cases, including aborted requests, request on timeout and for all error types @bbert
-
[4457] Fix MPD patching by applying necessary changes to tXml library @dsilhavy
-
[4434] Fix a bug in the CommonAccessTokenController.js that leads to null values for the token @dsilhavy
-
[4263] Clear list of resource timing entries once buffer is full @dsilhavy
-
[4364] Fix CommonMediaResponse resourceTiming.encodedBodySize @bbert
-
[4383] Fix transition from unencrypted to encrypted periods @dsilhavy
-
[4392] Upgrade to browser-tools 1.4.8 to solve Chromedriver issue @dsilhavy
-
[4420] Check for length of content protection element when checking if media is supported @dsilhavy
-
[4543] Add ESM files to package.json @littlespex
-
[4432] Adjust Github actions to build the network interceptor sample @dsilhavy
-
[4433] Fix Github CI/CD action to build and deploy samples @dsilhavy
-
[4445] Account for empty host in CommonAccessTokenController.js @dsilhavy
-
[4441] Fix TS typings for KeyErrorEvent and KeySessionCreatedEvent error @kris-youview
-
[4463] Resolve type mismatch when using Descriptor Types @stschr
-
[4618] Fix bugs in the segment scheduling for low latency streaming @dsilhavy
-
[4475] Fix a bug when filtering Representations based on min/max bitrate @dsilhavy
-
[4481] Override the minPlaybackRateChange check when newRate=1.0 @piersoh
-
[4488] Fix a bug that lead to playback stalling when bufferToKeep is larger than bufferTimeAtTopQuality @dsilhavy
-
[4528] Update liveCatchup.maxDrift logic to allow zero value. @BramB-1952444
-
[4537] Fixes an issue with the calculation of the segment replacementTime for SegmentTemplate @dsilhavy
-
[4539] Increase browserNoActivityTimeout for functional tests on lambdatest @dsilhavy
-
[4544] Adds logic to derive the selected bitrate of the previous period and uses that to select the target bitrate of the upcoming period @dsilhavy
-
[4549] Fixes the warnings coming from the Media Capabilities API by adding a robustness string for Widevine @dsilhavy
-
[4556] Fix a bug with texttrack selection if only forced subtitles are present @dsilhavy
-
[4565] Fix: ignore webpack esm export analysis @littlespex
-
[4583] This PR changes the implementation of Utils.addAdditionalQueryParameterToUrl. We are not relying on the native URL() class anymore but instead implement our own logic to add new query parameters. @dsilhavy
-
[4584] Fix setting of robustness in query to MediaCapabilities.decodingInfo() @gmcgarry
-
[4606] Remove outdated CMCD parameters from MPD request @dsilhavy
-
[4608] Fix buffer to keep seek test taking the new buffer rule into account. If the sum of the segment duration and the current buffer level exceed the buffer target we do not fetch this segment. @dsilhavy
-
[4613] Fix parsing of ProducerReferenceTime id attribute @bbert
-
[4626] Fix a bug when iterating over key Ids. Assume that only one of the keyIds need to be usable @dsilhavy
-
[4642] Fix a bug that caused the last segment of the last period not to be requested @dsilhavy
-
[4657] Fix bugs related to handling of DRM media key sessions @dsilhavy
-
#4679 Fix MSS bug when trying to derive a normalized key id @dsilhavy
-
#4684 Fix a bug that was adding CMCD parameters multiple times to the request URLs in case of request retries
-
#4693 Fix a bug that lead to filtering of a track in multiperiod MPDs @dsilhavy