Constructor
new VideoEvents(adSessionnon-null)
Parameters:
Name | Type | Description |
---|---|---|
adSession |
AdSession | associated with the video events. |
Methods
adUserInteraction(interactionTypenon-null)
Notifies all video listeners that the user has performed an ad interaction.
Parameters:
Name | Type | Description |
---|---|---|
interactionType |
InteractionType | to signal the latest user integration |
Throws:
-
error if the supplied interaction type is undefined or null.
-
error if the ad session has not been started or the impression event has not been triggered.
bufferFinish()
Notifies all video listeners that buffering has finished and video playback
has resumed.
Throws:
error if the ad session has not been started or the impression
event has not been triggered.
bufferStart()
Notifies all video listeners that video playback has stopped and started
buffering.
Throws:
error if the ad session has not been started or the impression
event has not been triggered.
complete()
Notifies all video listeners that video playback is complete.
Throws:
error if the ad session has not been started or the impression
event has not been triggered.
firstQuartile()
Notifies all video listeners that video playback has reached the first
quartile.
Throws:
error if the ad session has not been started or the impression
event has not been triggered.
loaded(vastPropertiesnon-null)
Notifies all video listeners that video content has been loaded and ready
to start playing.
Parameters:
Name | Type | Description |
---|---|---|
vastProperties |
VastProperties | containing static information about the video placement. |
- See:
-
- VastProperties
Throws:
error if the supplied VAST properties is undefined or null.
midpoint()
Notifies all video listeners that video playback has reached the midpoint.
Throws:
error if the ad session has not been started or the impression
event has not been triggered.
pause()
Notifies all video listeners that video playback has paused after a user
interaction.
Throws:
error if the ad session has not been started or the impression
event has not been triggered.
playerStateChange(playerStatenon-null)
Notifies all video listeners that video player state has changed.
Parameters:
Name | Type | Description |
---|---|---|
playerState |
VideoPlayerState | to signal the latest video player state |
- See:
-
- PlayerState
Throws:
-
error if the supplied player state is undefined or null.
-
error if the ad session has not been started or the impression event has not been triggered.
resume()
Notifies all video listeners that video playback has resumed (after being
paused) after a user interaction.
Throws:
error if the ad session has not been started or the impression
event has not been triggered.
skipped()
Notifies all video listeners that video playback has stopped as a user skip
interaction. Once skipped video it should not be possible for the video to
resume playing content.
Throws:
error if the ad session has not been started or the impression
event has not been triggered.
start(duration, videoPlayerVolume)
Notifies all video listeners that video content has started playing.
Parameters:
Name | Type | Description |
---|---|---|
duration |
number | of the selected video media (in seconds). |
videoPlayerVolume |
number | from the native video player with a range between 0 and 1. |
Throws:
-
error if an invalid duration or videoPlayerVolume has been supplied.
-
error if the ad session has not been started or the impression event has not been triggered.
thirdQuartile()
Notifies all video listeners that video playback has reached the third
quartile.
Throws:
error if the ad session has not been started or the impression
event has not been triggered.
volumeChange(videoPlayerVolume)
Notifies all video listeners that the video player volume has changed.
Parameters:
Name | Type | Description |
---|---|---|
videoPlayerVolume |
number | from the native video player. |
Throws:
-
error if an invalid videoPlayerVolume has been supplied.
-
error if the ad session has not been started or the impression event has not been triggered.