Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMSG events in Google DAI #3311

Closed
avelad opened this issue Apr 6, 2021 · 10 comments
Closed

EMSG events in Google DAI #3311

avelad opened this issue Apr 6, 2021 · 10 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: question A question from the community

Comments

@avelad
Copy link
Collaborator

avelad commented Apr 6, 2021

Have you read the Tutorials? Yes

Have you read the FAQ and checked for duplicate open issues? Yes

What version of Shaka Player are you using? 3.0.10

Please ask your question
I have seen that in the Google DAI project they have uploaded an example of integration with the Shaka Player, in the example they use EMSG events to notify the stream manager. Should the same be done in the internal integration of the Shaka Player?
https://github.com/googleads/googleads-ima-html5-dai/blob/master/shaka/dai.js#L410-L412

I have also seen that the timelineregionenter (example) event is used instead of timelineregionadded (library), what is correct?

@ismena , I think this is of your interest :)

@avelad avelad added the type: question A question from the community label Apr 6, 2021
@ismena
Copy link
Contributor

ismena commented Apr 6, 2021

Ahh! How come I know so little about the whole emsg event business?!
If it's working then I probably either wrote or reviewed it, but my mind id just going blank!

So, emsg events signal current ad state, is that right?

@avelad
Copy link
Collaborator Author

avelad commented Apr 7, 2021

Well, precisely this part I did not know, that's why I asked you ...

Do you know someone within Google to ask about this?

@TheModMaker
Copy link
Contributor

EMSG events are things for signaling events in the media, they are not necessarily associated with ads. We fire an event when an EMSG is parsed from the media, giving the app the data about it. An EMSG data indicates something happens at some time within the media. This can cover a range of times, or just be a point in time. This can be used to signal the start of an ad, or it could be used for anything.

We also have a separate thing for the <EventStream> elements in DASH. We fire a timelineregionadded event when one of these events is added. This usually happens during manifest parsing or updates. While playing, we fire a timelineregionenter and timelineregionexit events when we enter or exit one of these regions respectively. I don't remember if we map the EMSG events to timeline regions.

@ismena
Copy link
Contributor

ismena commented Apr 8, 2021

Ah, ok. Sorry, I didn't look at the IMA sample code closely when I wrote the first comment.

I need to sync with the IMA team on that - that example is based on our code from before our IMA integration. If you're using our integration, it shouldn't be relevant for you.

Tl;Dr: We're doing the same thing they are and this is already part of the library.

Regarding the way it currently works with library (I did write that code, thanks @TheModMaker for refreshing my memory!)
This is the part where we handle ad-related EMSG events. There are two ways to communicate timed metadata to the IMA SDK: processMetaData and onTimedMetaData. We use the first one and pass the region start time through it, thus delegating it to the IMA to track when the region was entered. In their example, they're likely using the second one which signals that a region is being entered now. Hence the discrepancy between the events we listen to, but
either way is fine.

Does this make sense?

@avelad
Copy link
Collaborator Author

avelad commented Apr 9, 2021

It makes sense to me, but a double check with the IMA team wouldn't be bad.

@ismena
Copy link
Contributor

ismena commented Apr 9, 2021

The part about EMSG events is in sync with the IMA team.
I'll reach out to them about using our updated code in their examples.

@ismena ismena closed this as completed Apr 9, 2021
@ismena ismena self-assigned this Apr 9, 2021
@avelad
Copy link
Collaborator Author

avelad commented Apr 19, 2021

@ismena I've been thinking about this. How would DAI work with HLS using mp4? Right now we process events for DASH, src = (HLS Apple devices), and HLS using mux.js, but there is no ID3 parsing in HLS using mp4, how should it work?

Can you reopen the issue while my question is resolved?

@ismena
Copy link
Contributor

ismena commented Apr 19, 2021

Looks like it's possible to embed ID3 in mp4, although we don't parse/use mux to parse them at the moment.

We'll need to do it to support DAI with HLS/mp4. Let me file a separate issue for that. We might have to hunt down some content for testing, though as the IMA team doesn't seem to have any at the moment.

Re: DASH events - the IMA team is working on fixing their samples to reflect our built-in IMA integration.

@ismena
Copy link
Contributor

ismena commented Apr 19, 2021

Created #3351

@avelad
Copy link
Collaborator Author

avelad commented Apr 20, 2021

Thanks @ismena !

@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Jun 8, 2021
@shaka-project shaka-project locked and limited conversation to collaborators Jun 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: question A question from the community
4 participants