Integrator Docs | Developer Docs | Github


This project includes a feature called redispatch which will monitor all media events and modify them with the goal of making the usage of ads transparent. For example, in ad mode, a playing event would be sent as an adplaying event. Code that listens to the playing event will not see playing events that result from an advertisement playing.

In order for redispatch to work correctly, any ad plugin built using contrib-ads must be initialized as soon as possible, before any other plugins that attach event listeners.

Different platforms, browsers, devices, etc. send different media events at different times. Redispatch does not guarantee a specific sequence of events, but instead ensures that certain expectations are met. The next section describes those expectations.

The Law of the Land: Redispatch Event Behavior

play events

playing events

ended events

loadstart events

Ad events


Content resuming events