Constructor
new MediaEvents(adSessionnon-null)
Parameters:
Name | Type | Description |
---|---|---|
adSession |
AdSession | The ad session instance for sending events. |
- Source:
Throws:
error if the supplied ad session is undefined or null.
Methods
adUserInteraction(interactionTypenon-null)
Notifies all media listeners that the user has performed an ad interaction.
Parameters:
Name | Type | Description |
---|---|---|
interactionType |
InteractionType | The latest user interaction. |
- Source:
Throws:
error if the supplied interaction type is undefined or null.
adUserInteraction(interactionTypenon-null)
Notifies all media listeners that the user has performed an ad interaction.
Parameters:
Name | Type | Description |
---|---|---|
interactionType |
InteractionType | The latest user interaction. |
- Source:
Throws:
error if the supplied interaction type is undefined or null.
bufferFinish()
Notifies all media listeners that buffering has finished and media playback
has resumed.
- Source:
bufferFinish()
Notifies all media listeners that buffering has finished and media playback
has resumed.
- Source:
bufferStart()
Notifies all media listeners that media playback has stopped and started
buffering.
- Source:
bufferStart()
Notifies all media listeners that media playback has stopped and started
buffering.
- Source:
complete()
Notifies all media listeners that media playback is complete.
- Source:
complete()
Notifies all media listeners that media playback is complete.
- Source:
firstQuartile()
Notifies all media listeners that media playback has reached the first
quartile.
- Source:
firstQuartile()
Notifies all media listeners that media playback has reached the first
quartile.
- Source:
midpoint()
Notifies all media listeners that media playback has reached the midpoint.
- Source:
midpoint()
Notifies all media listeners that media playback has reached the midpoint.
- Source:
pause()
Notifies all media listeners that media playback has paused after a user
interaction.
- Source:
pause()
Notifies all media listeners that media playback has paused after a user
interaction.
- Source:
playerStateChange(playerStatenon-null)
Notifies all media listeners that media player state has changed.
Parameters:
Name | Type | Description |
---|---|---|
playerState |
VideoPlayerState | The latest media player state. |
- Source:
- See:
-
- VideoPlayerState
Throws:
error if the supplied player state is undefined or null.
playerStateChange(playerStatenon-null)
Notifies all media listeners that media player state has changed.
Parameters:
Name | Type | Description |
---|---|---|
playerState |
VideoPlayerState | The latest media player state. |
- Source:
- See:
-
- VideoPlayerState
Throws:
error if the supplied player state is undefined or null.
resume()
Notifies all media listeners that media playback has resumed (after being
paused) after a user interaction.
- Source:
resume()
Notifies all media listeners that media playback has resumed (after being
paused) after a user interaction.
- Source:
skipped()
Notifies all media listeners that media playback has stopped as a user skip
interaction. Once skipped media it should not be possible for the media to
resume playing content.
- Source:
skipped()
Notifies all media listeners that media playback has stopped as a user skip
interaction. Once skipped media it should not be possible for the media to
resume playing content.
- Source:
start(duration, mediaPlayerVolume)
Notifies all media listeners that media content has started playing.
Parameters:
Name | Type | Description |
---|---|---|
duration |
number | Duration of the selected media media (in seconds). |
mediaPlayerVolume |
number | Audio volume of the media player with a range between 0 and 1. |
- Source:
Throws:
error if an invalid duration or mediaPlayerVolume has been
supplied.
start(duration, mediaPlayerVolume)
Notifies all media listeners that media content has started playing.
Parameters:
Name | Type | Description |
---|---|---|
duration |
number | Duration of the selected media media (in seconds). |
mediaPlayerVolume |
number | Audio volume of the media player with a range between 0 and 1. |
- Source:
Throws:
error if an invalid duration or mediaPlayerVolume has been
supplied.
thirdQuartile()
Notifies all media listeners that media playback has reached the third
quartile.
- Source:
thirdQuartile()
Notifies all media listeners that media playback has reached the third
quartile.
- Source:
volumeChange(mediaPlayerVolume)
Notifies all media listeners that the media player has changed the volume.
Parameters:
Name | Type | Description |
---|---|---|
mediaPlayerVolume |
number | Audio volume of the media player with a range between 0 and 1. |
- Source:
Throws:
error if an invalid mediaPlayerVolume has been supplied.
volumeChange(mediaPlayerVolume)
Notifies all media listeners that the media player has changed the volume.
Parameters:
Name | Type | Description |
---|---|---|
mediaPlayerVolume |
number | Audio volume of the media player with a range between 0 and 1. |
- Source:
Throws:
error if an invalid mediaPlayerVolume has been supplied.