-
- All Implemented Interfaces:
@MainThread() public interface InstreamAdPlayer
This interface is used for playing instream ad
-
-
Method Summary
Modifier and Type Method Description abstract Unit
prepareAd(VideoAd videoAd)
Prepares player for playing video ad. abstract Unit
playAd(VideoAd videoAd)
Starts playing ad abstract Unit
pauseAd(VideoAd videoAd)
Pauses playing ad abstract Unit
resumeAd(VideoAd videoAd)
Resumes playing ad abstract Unit
stopAd(VideoAd videoAd)
Stops playing ad abstract Unit
skipAd(VideoAd videoAd)
Skips playing ad abstract Unit
setVolume(VideoAd videoAd, Float volume)
Sets ad player volume, with 0 being silence and 1 being maximum volume level abstract Float
getVolume(VideoAd videoAd)
Gets player volume level in range 0.0, 1. abstract Unit
releaseAd(VideoAd videoAd)
Releases ad player object abstract Unit
setInstreamAdPlayerListener(InstreamAdPlayerListener instreamAdPlayerListener)
Sets listener for ad player events. abstract Long
getAdDuration(VideoAd videoAd)
Gets ad video duration abstract Long
getAdPosition(VideoAd videoAd)
Gets current ad video position abstract Boolean
isPlayingAd(VideoAd videoAd)
Gets value indicating whether player is playing ad -
-
Method Detail
-
prepareAd
abstract Unit prepareAd(VideoAd videoAd)
Prepares player for playing video ad. Implement only this method for prepare Ad.
- Parameters:
videoAd
- object providing information about the advertising video file to be played.
-
playAd
abstract Unit playAd(VideoAd videoAd)
Starts playing ad
- Parameters:
videoAd
- object providing information about the advertising video file to be played.
-
pauseAd
abstract Unit pauseAd(VideoAd videoAd)
Pauses playing ad
- Parameters:
videoAd
- object providing information about the advertising video file to be played.
-
resumeAd
abstract Unit resumeAd(VideoAd videoAd)
Resumes playing ad
- Parameters:
videoAd
- object providing information about the advertising video file to be played.
-
stopAd
abstract Unit stopAd(VideoAd videoAd)
Stops playing ad
- Parameters:
videoAd
- object providing information about the advertising video file to be played.
-
skipAd
abstract Unit skipAd(VideoAd videoAd)
Skips playing ad
- Parameters:
videoAd
- object providing information about the advertising video file to be played.
-
setVolume
abstract Unit setVolume(VideoAd videoAd, Float volume)
Sets ad player volume, with 0 being silence and 1 being maximum volume level
- Parameters:
videoAd
- object providing information about the advertising video file to be played.volume
- volume level in range 0.0, 1.
-
getVolume
abstract Float getVolume(VideoAd videoAd)
Gets player volume level in range 0.0, 1.0
- Parameters:
videoAd
- object providing information about the advertising video file to be played.
-
releaseAd
abstract Unit releaseAd(VideoAd videoAd)
Releases ad player object
- Parameters:
videoAd
- object providing information about the advertising video file to be played.
-
setInstreamAdPlayerListener
abstract Unit setInstreamAdPlayerListener(InstreamAdPlayerListener instreamAdPlayerListener)
Sets listener for ad player events. For each event of the instream ad player, the corresponding callback must be called on this object.
- Parameters:
instreamAdPlayerListener
- Listener for ad player events
-
getAdDuration
abstract Long getAdDuration(VideoAd videoAd)
Gets ad video duration
- Parameters:
videoAd
- object providing information about the advertising video file to be played.
-
getAdPosition
abstract Long getAdPosition(VideoAd videoAd)
Gets current ad video position
- Parameters:
videoAd
- object providing information about the advertising video file to be played.
-
isPlayingAd
abstract Boolean isPlayingAd(VideoAd videoAd)
Gets value indicating whether player is playing ad
- Parameters:
videoAd
- object providing information about the advertising video file to be played.
-
-
-
-