Closed
Description
Per sections 5.3.2.4 and 5.3.3.7 of the IOP, we should support EventStream in DASH manifests. An EventStream contains Event elements that reference ranges in the timeline. When the playhead hits one of these ranges, the event fires, and delivers the payload of the underlying Event element.
The IOP is not very clear on how this functionality should be implemented, but we have three example use-cases that might inform the behavior:
- Fire a beacon when a user views an ad
- Change the page context when an ad is in-progress (eg different banner)
- Prevent users from scrubbing past ad pods, or take action when they attempt to scrub past ad pods
I can imagine three types of events that Shaka fires, all would contain the payload and the range covered by the event.
timelineeventstart
: fired when the playhead hits a point referenced by anEvent
element. Maybe we can listen totimeupdate
on the video element for this?timelineeventend
: fired when the playhead leaves a point referenced by anEvent
element.timelineeventcreated
: fired when a new event is added to the timeline. This gives us an easy way to track the positions of the events for use-cases like the third listed above.
This is related to, but distinct from EMSG box support, referenced in #259.
If we can agree on a design, I'm happy to put up a PR.