Bringing it all together
For the grand finale, we will bring everything together: an example with languages, fallback, immersive audio, and accessibility.
We will prepare a manifest file that includes several languages and codecs, immersive audio, and an accessible presentation with AudioDescription.
| # | Codec | Language | selection priority | channel configuration | role | accessibility | notes |
|---|---|---|---|---|---|---|---|
| 1 | AAC | English | 96 | stereo | main | ||
| 2 | Dolby Digital Plus | English | 97 | 5.1 | main | ||
| 3 | Dolby Digital Plus | English | 99 | immersive | main | ||
| 4 | Dolby AC-4 | English | 98 | 5.1 | main | ||
| 5 | Dolby AC-4 | English | 100 | immersive | main | ||
| 6 | Dolby Digital Plus | Spanish | 95 | 5.1 | main | ||
| 7 | Dolby Digital Plus | English | 94 | stereo | alternate | description | VDS |
The selection rules above can be implemented with the rules laid down in the DASH-IF guidelines, clause 3.9.4.
To let dash.js know these selection rules should be applied, use the setInitialMediaSettingsFor() method.
Let's run through these rules to illustrate how this works.
- low-end device
- This device only supports AAC, and no other codec. The very first step removes all AdaptationSets except #1, which will subsequently be selected and played.
- Dolby Atmos TV, English language preferred
- This device supports Dolby Atmos in Dolby Digital. The AdaptationSets referencing Dolby AC-4 assets are removed. Of the remaining assets, #3 has the highest priority and is selected and played.