public final class VideoEvents
extends java.lang.Object
Created by Natasha Garner on 10/09/2017.
| Modifier and Type | Method and Description |
|---|---|
void |
adUserInteraction(InteractionType interactionType)
Notify all video listeners that the user has performed an ad interaction.
|
void |
bufferFinish()
Notify all video listeners that buffering has finished and video playback has resumed.
|
void |
bufferStart()
Notify all video listeners that video playback has stopped and started buffering.
|
void |
complete()
Notify all video listeners that video playback is complete.
|
static VideoEvents |
createVideoEvents(AdSession adSession)
Create video events instance for the associated ad session.
|
void |
firstQuartile()
Notify all video listeners that video playback has reached the first quartile.
|
void |
loaded(VastProperties vastProperties)
Notify all video listeners that video content has been loaded and ready to start playing.
|
void |
midpoint()
Notify all video listeners that video playback has reached the midpoint.
|
void |
pause()
Notify all video listeners that video playback has paused after a user interaction.
|
void |
playerStateChange(PlayerState playerState)
Notify all video listeners that video player state has changed.
|
void |
resume()
Notify all video listeners that video playback has resumed (after being paused) after a user
interaction.
|
void |
skipped()
Notify all video listeners that video playback has stopped as a user skip interaction.
|
void |
start(float duration,
float videoPlayerVolume)
Notify all video listeners that video content has started playing.
|
void |
thirdQuartile()
Notify all video listeners that video playback has reached the third quartile.
|
void |
volumeChange(float videoPlayerVolume)
Notify all video listeners that the video player volume has changed.
|
public static VideoEvents createVideoEvents(AdSession adSession)
adSession - associated with the ad events.java.lang.IllegalArgumentException - if the supplied ad session is null.java.lang.IllegalStateException - if a video events instance has already been registered with
the ad session.java.lang.IllegalStateException - if a video events instance has been created after the ad
session has started.AdSessionpublic void loaded(VastProperties vastProperties)
vastProperties - containing static information about the video placement.java.lang.IllegalArgumentException - if the supplied VAST properties is null.java.lang.IllegalStateException - if the ad session has finished.VastPropertiespublic void start(float duration,
float videoPlayerVolume)
duration - of the selected video media (in seconds).videoPlayerVolume - from the native video player with a range between 0 and 1.java.lang.IllegalArgumentException - if an invalid duration or videoPlayerVolume has been supplied.java.lang.IllegalStateException - if the ad session has not been started or has finished.public void firstQuartile()
java.lang.IllegalStateException - if the ad session has not been started or has finished.public void midpoint()
java.lang.IllegalStateException - if the ad session has not been started or has finished.public void thirdQuartile()
java.lang.IllegalStateException - if the ad session has not been started or has finished.public void complete()
java.lang.IllegalStateException - if the ad session has not been started or has finished.public void pause()
java.lang.IllegalStateException - if the ad session has not been started or has finished.public void resume()
java.lang.IllegalStateException - if the ad session has not been started or has finished.public void bufferStart()
java.lang.IllegalStateException - if the ad session has not been started or has finished.public void bufferFinish()
java.lang.IllegalStateException - if the ad session has not been started or has finished.public void skipped()
java.lang.IllegalStateException - if the ad session has not been started or has finished.public void volumeChange(float videoPlayerVolume)
videoPlayerVolume - from the native video player with a range between 0 and 1.java.lang.IllegalArgumentException - if an invalid videoPlayerVolume has been supplied.java.lang.IllegalStateException - if the ad session has not been started or has finished.public void playerStateChange(PlayerState playerState)
PlayerState for
list of supported states.playerState - to signal the latest video player statejava.lang.IllegalArgumentException - if the supplied player state is null.java.lang.IllegalStateException - if the ad session has not been started or has finished.PlayerStatepublic void adUserInteraction(InteractionType interactionType)
InteractionType for list of supported types.interactionType - to signal the latest user integrationjava.lang.IllegalArgumentException - if the supplied interaction type is null.java.lang.IllegalStateException - if the ad session has not been started or has finished.InteractionType