datacue
datacue copied to clipboard
Mapping of emsg boxes to the media timeline
For DataCue to expose in-band emsg boxes to web applications, the spec would need to define a mapping to the HTML media timeline.
See https://github.com/w3c/media-source/issues/189 for discussion.
One specific question raised was:
- At what point do we know interoperably that we don't need to parse an emsg box because the time is already past?
The DASH events timing model is described here (section 3).
The timeline mapping differs between emsg version 0 and version 1:
version 0:
startTime = PeriodStart - SegmentBase@presentationTimeOffset / SegmentBase@timescale + LAT + emsg@presentation_time_delta / emsg@timescale
LAT is the earliest presentation time of the Segment containing the Event Message box
version 1:
startTime = PeriodStart - InbandEventStream@presentationTimeOffset / InbandEventStream@timescale + emsg@presentation_time / emsg@timescale
How to these values relate to the MSE SourceBuffer.timestampOffset?