dash.js – Give me a high five

Rocky, Pirates of the Caribbean, Die Hard and The Matrix: What do all these movies have in common? All of them are often cited for having a poorly received fifth edition.

With dash.js we do it differently. Thanks to all of our contributors we consider dash.js v5.0.0 to be a major improvement compared to previous versions. And the best thing is: It’s available for free, no expensive subscription needed and no need to watch prerolls or midrolls (although, to be fair we enable use cases such as ad-insertion ourselfs).

On February,14th 2025 we officially released dash.js version 5.0.0. A little behind schedule, as we were aiming for a release in 2024 but still less delayed than the average train of Deutsche Bahn.

What can you expect from version 5.0.0? In the following sections we dive into some of the main additions to the player. Of course, we cannot cover all the changes in this blog post, but you can always check out the detailed release notes.

Why are you hurting yourself?

Image Source: https://trailers.getyarn.io/yarn-clip/2dfc12fb-5f64-4845-8a7d-0c9186749651

External DDoS attacks can be very painful to handle. You know what’s even worse? DDoSing yourself.

Imagine this: We provide a live media service to our customers with a large DVR window. The media segments are not aligned, and we use a DASH manifest with <SegmentTimeline> signaling. Suddenly we see this reoccurring pattern leading to very large manifest files (see also our previous post “To understand is to perceive <Patterns>”). Depending on the platform the parsing of such manifest files can consume a large amount of time. In the worst case the parsing time is larger than the interval between two consecutive MPD updates. At this point the media player would be doing nothing else than parsing, updating, parsing, updating and so on. Here is our DDoS attack, and we can’t even blame anyone for it (except for the content author maybe).

With dash.js we introduced a new XML parsing library called tXml. The new library significantly improves the parsing times on low-end devices leading to better performance and faster startup times.

The credits for this go to Bertrand Berthelot (Broadpeak) who contributed this feature to dash.js.

No integrals to see here

Image Source: https://www.zmescience.com/feature-post/natural-sciences/mathematics/math-the-simpsons-05263/

Yuriy if you are reading this: No worries, no integrals were harmed. But even with some fundamental math and the help of W3C APIs we can improve the throughput calculation in dash.js.

With v5.0.0 we introduce support for the Resource Timing API and the Network Information API. Moreover, new throughput calculation modes such as harmonic mean with sliding window were added. Looking for more details and how to use the new modes? Checkout our new documentation on throughput calculation and the corresponding pull request.

To start use any key

Image Source: https://media.tenor.com/a-TsAtfszc8AAAAe/homer-any.png

There is no “any key” to decrypt all of our content. In fact, even the same content is typically encrypted with different keys for the SD, HD and UHD track. Speaking in DASH terms that means that we use multiple AdaptationSets for the video content in our MPD (one for each video track).  And now comes the tricky part: Typically a mediaplayer will choose one AdaptationSet and then only adapt between the Representations defined in that AdaptationSet. But what if our client fulfills all the requirements to play the SD, HD and UHD tracks? Wouldn’t we want the media player to adapt between Representations of all the supported AdapatationSets?

Fortunately there is a SupplementalProperty in DASH to support exactly that use case. With dash.js v5.0.0 we add support for <SupplementalProperty schemeIdUri="urn:mpeg:dash:adaptation-set-switching:2016>. Moreover, we now handle keystatuseschange events thrown by the Encrypted Media Extensions directly in the player. That way we can react dynamically to keys that are no longer usable or become usable during playback (e.g. due to changes caused by HDCP requirements).

More details can again be found in the two pull requests #4562 and #4576.

Did you read the whole book?

Image Source: https://cdn-images-1.medium.com/max/640/0*GqxcDsQ3cVEnkwJx.png

Personally, I sometimes struggle to read a book from the beginning to the end. I feel like a lot of books are too long and not getting to the point. Luckily the DASH specification is extremely entertaining and the colleagues from Qualabs even read its Annex. This is why we can now announce that dash.js v5.0.0 has basic support for UrlQueryInfo and ExtUrlQueryInfo.

As an example, this new feature allows defining rules in the MPD that instruct the media player to extract query parameters from the MPD request and append them to the requests for media objects. This enables use cases such as support for the Common Access Token.

More information can again be found in the corresponding pull request.

We have tons of books about streaming

Image Source: https://benbrookshelflife.wordpress.com/wp-content/uploads/2014/08/librarysign.jpg

Libraries are great! You have a great selection of books, and it typically costs you almost nothing to read them. The same is true for open-source software libraries. While the work of maintaining such libraries usually falls on only a few shoulders, the community benefits greatly from the features provided to them for free. An example of such a library is the Common Media Library (CML) maintained by Casey Occhialini (Paramount).

The CML implements common media player functionality such as support for parsing ID3 payloads and encoding CMCD query strings.

dash.js v5.0.0 uses multiple features of the CML, more information can again be found in the pull requests #4391,#4351and #4206.

Please don’t force me to read

Image Source: https://i.pinimg.com/564x/48/20/35/4820353b3762ca35193088493d5922ca.jpg

Childhood flashback: We already spent our allowed time in front of the TV and/or the gaming consoles. We are bored and ask our parents what to do. They make some very disturbing suggestions like “play outside with your brother” or even worse “read a book” (btw I enjoy reading now). That’s like telling you to eat an apple or a banana if you are craving a dessert.

Sorry to disappoint you here, but we are also making you read. With dash.js v5.0.0 we introduce support for forced subtitles. If subtitles are deactivated, dash.js checks for a suitable forced-subtitle track and renders its content.

Details can again be found in the pull request.

Did you read the manual?

Image Source: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSPBc1iH9rMakIY-W3U0TMOmu8oz9i2Tb7Oog&s

How do we typically set up and try new technology and gadgets? Probably only a few of us actually start by reading the manual first. For me, it’s rather the approach of trying to set it up on my own, failing, and then taking the time to actually read the manual.

With dash.js v5.0.0 we released a new documentation website: https://dashif.org/dash.js/ . Together with our sample section and our API documentation users and developers benefit from usage instructions and concrete examples on how to implement and configure specific features. The documentation also contains a migration guide for v5.0.0 and information about the new bundle formats.

Teamwork – Possibility of blaming the other

Image Source:  https://i.pinimg.com/736x/5f/0d/98/5f0d984e68a9a07e2989f7a8141101b2.jpg

Finally, we would like to thank all the developers who contributed to this major milestone again, especially Bertrand Berthelot, Casey Occhialini, Stephan Schreiner, Matías Rodriguez, Joaquin Bartaburu, Gregory McGarry and Björn Altmann.

The work on dash.js continues and have exciting new implementation tasks such as support for Server Guided Ad-Insertion, L3D-DASH and CMCD v2 ahead of us.

If you want to find out more about our dash.js activities check out our website. We also like to invite you to the next dash.js face to face taking place on June 23, 2025 in Berlin, Germany co-located with the 12th edition of our FOKUS Media Web Symposium.

Leave a Reply

Your email address will not be published. Required fields are marked *