The Applixir Video platform provides a local call back with status of the events that occur when the video is being played. In this case, the events are directly sent to the device on which the video player is running. This can be used to display messages to the users.
To enable status call back, create a call back handler method and pass it as the value of the parameter adStatusCb in the options to the invokeApplixirVideoUnit method.
Refer the example shown below:
<script type="application/javascript">
function adStatusCallback(status) { // Create a status Callback Method
console.log('Ad Status: ' + status);
}
var options = { //Video Ad Options
zoneId: 2050,
adStatusCb: adStatusCallback, //Mandatory for setting up local status callback
};
invokeApplixirVideoUnit(options); // Invoke Video ad
</script>
Events are on the SDK’s thread so make sure to return quickly from the callback handlers or the ad process may time out. If you need to do extensive processing of an event such as showing a message, set a variable in the event handler which can be checked and processed by your thread after the event has returned.
Following are the different status messages which are received in the call back event.