The Event callbacks section of the player is made to be used for various custom implementations.
The following player events are currently supported by this system:
- ready - fired from the player when it is ready for API manipulation.
- adStart - fired from the player when an ad starts playback.
- adImpression - fired from the player when an impression pixel is fired from an ad.
- adError - fired from the player when an ad errors out for any reason. This includes empty VAST responses.
- adEnd - fired from the player when an ad finishes playback.
- start - fired from the player when video content starts playback.
- end - fired from the player video content finishes playback.
- Once you login into the CMS, navigate to the PLAYERS section and select your player.
- Scroll down until you see the EVENT CALLBACK section of the player an open up the accordion.
- Click on the ADD CALLBACK button to create a new callback.
- Select the event you want to use for your custom implementation from the dropdown list.
- Add another callback if needed and then SAVE your player.
You have now successfully added a custom callback implementation to your player without any embed code changes!
NOTE: You can use the this keyword as a reference to the player always. For example:
console.log('player object', this);