Live stream: live delay calculation with different fragment durations
Created by: spoeschel
Environment
-
The MPD passes the DASH-IF Conformance Tool on https://conformance.dashif.org/ -
The stream has correct Access-Control-Allow-Origin headers (CORS) -
There are no network errors such as 404s in the browser console when trying to play the stream -
The issue observed is not mentioned on https://github.com/Dash-Industry-Forum/dash.js/wiki/FAQ -
The issue occurs in the latest reference client on http://reference.dashif.org/dash.js/ and not just on my page
- Link to playable MPD file: (as the stream is geoblocked, I can only attach the MPD here: different_seglen.mpd.txt)
- Dash.js version: 3.1.0
- Browser name/version: Firefox 75.0
- OS name/version: Ubuntu MATE 18.04
The live delay calculation is invoked for every (updated) representation.
[assumption: no suggestedPresentationDelay
is present in the MPD and any of the other manual overrides aren't used]
If multiple representations with different segment lengths are present in the MPD (e.g. 6 seconds for video, 2 seconds for subtitles) this leads to a wrong result, as the last invokation (here: the 2s of the subtitles) actually counts, resulting in an 8s delay here.
A solution to address this would be to always use the highest of all the received values i.e. to keep the (so far) highest segment length beyond any calls to the function and to update that value only in case a new value is higher. This way the maximum of all segment lengths would be used, after all new representations of the MPD have fired.