Ad States
videoPlayer?.setPlayerStateDelegate(object : PlayerStateDelegate{
override fun onPlayerStateChanged(playerEvent: PlayerEvent<Any>) {
if(playerEvent.type == PlayerState.VIDEO_AD_STATE){
print(playerEvent.value)
}
...
}
})
The table below provides information about the ad states available in Android.
| PlayerState | Description | Value Return Type |
|---|---|---|
| VIDEO_AD_STATE | Current state of Ad | AdEvent |
| VIDEO_AD_CONTENT_COMPLETED | Ad Content is completed | Boolean |
| VIDEO_AD_ERROR | Video ad error | Boolean |
| VIDEO_AD_ENDED | Ad ended | Boolean |
| VIDEO_AD_STATE | Current state of Ad | AdEvent |
| VIDEO_AD_CONTENT_COMPLETED | Ad Content is completed | Boolean |
| VIDEO_AD_ERROR | Video ad error | Boolean |
| VIDEO_AD_ENDED | Ad ended | Boolean |
| VIDEO_AD_STATE | Current state of Ad | AdEvent |
| VIDEO_AD_CONTENT_COMPLETED | Ad Content is completed | Boolean |
| VIDEO_AD_ERROR | Video ad error | Boolean |
| VIDEO_AD_ENDED | Ad ended | Boolean |