Events are not firing
Created by: sinjuice
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: https://815fhw9.s3.amazonaws.com/PLAYLIST_U.MPD
- Dash.js version: 3.0
- Browser name/version: Firefox Quantum 69.0.2
- OS name/version: Ubuntu 19.04
Steps to reproduce
Load the playlist, I pause the video and I wait for the player (looking at network requests) to load the second period(once i see the second period init.mp4 loaded) then I continue playing the video.
Observed behaviour
In the version 3.0 of the player the event is firing well if the second period is not loaded, but once the second period gets loaded by the player, no events from the first period are triggered.
In the nightly build due to a commit(https://github.com/Dash-Industry-Forum/dash.js/pull/3047/commits/d8faabd1e906ca8fb5fabd41b51f885e2d2f142b) no events are working at all. This is due to presentationTimeThreshold being calculated using
lastEventTimerCall = Date.now() / 1000; // current timestamp
and
var currentVideoTime = playbackController.getTime(); // 0 at start
var presentationTimeThreshold = (currentVideoTime - lastEventTimerCall); // == negative timestamp
which will remove all the events thinking that they are expired.
BTW, the MPD does not pass the Conformance test because it starts with <?xml... and once i remove the <?xml it says to me that the Period cannot contain an EventStream element. I think the conformance tool is outdated.