When using version 1 event messages, their presentation time in the media timeline is bumped out (roughly) double the expected time from the start time.
When playing video with inband version 1 event messages (emsg), theDashAdapter.js code uses version 0 logic and adds the presentation_time_delta field of the eventBox object to the presentation time of the current segment to create the presentationTime for the event.
// grab the presentation time delta
const presentationTimeDelta = eventBox.presentation_time_delta;
... // then use it to calculate a presentation time in the future.
const presentationTime = startTime * timescale + presentationTimeDelta;
The code overloads the eventBox.presentation_time_delta field such that it contains the presentation_time_delta for version 0 event messages and presentation_time for version 1 event messages.
Propose modifying the code to treat the presentation_time_delta variable differently depending on the version of event message box you are using. Here is a diff:
When using version 1 event messages, their presentation time in the media timeline is bumped out (roughly) double the expected time from the start time.
When playing video with inband version 1 event messages (
emsg
), theDashAdapter.js
code uses version 0 logic and adds thepresentation_time_delta
field of theeventBox
object to the presentation time of the current segment to create thepresentationTime
for the event.The code overloads the eventBox.presentation_time_delta field such that it contains the presentation_time_delta for version 0 event messages and presentation_time for version 1 event messages.
Propose modifying the code to treat the
presentation_time_delta
variable differently depending on the version of event message box you are using. Here is a diff:This produces the expected behavior.
Environment
Steps to reproduce
<InbandEventStream schemeIdUri="urn:scte:scte35:2013:xml";" value="999" />
samples/advanced/listening-to-SCTE-EMSG-events.html
pageObserved behaviour
events.html
page.