Description
I'm looking for clarification on how to interpret the EMSG events being sent by Shaka, specifically, the timing info.
Shaka sends an event that looks roughly like this:
const mockShakaEmsgEvent = {
type: 'emsg',
timestamp: 168271.6,
detail: {
messageData: [88, 89, 90 ....],
eventDuration: 0,
id: 1000300,
presentationTimeDelta: 0,
schemeIdUri: "urn:foo:bar:id3:2016",
timescale: 48000
value:"0"
}
};
Does the mockSkakaEmsgEvent.timestamp
refer to the timestamp
of the event stream event? Meaning if you take ( timestamp / timescale ) - presentationTimeDelta
it will give the presentation time of the start of the event?
I think my confusion is resulting from several things. The timescale property docs say:
Provides the timescale, in ticks per second, for the time and duration fields within this box.
There is an eventDuration
field on the event.detail
object so I assume that the timescale
applies to that property. But there is no time
property on the event.detail
object so it's unclear to me which time the timescale applies to. Do I need to parse the messageData
or does the timescale
apply to the timestamp
property?
Part of my confusion also is coming from the fact that I am getting different emsg timestamps for the same sample content from the Chromecast MPL library than I am from the Shaka player.