-
- All Implemented Interfaces:
@MainThread() public interface InstreamAdPlayer
This interface is used for playing instream ad
-
-
Method Summary
Modifier and Type Method Description abstract voidprepareAd(@NonNull() VideoAd videoAd)Prepares player for playing video ad. abstract voidplayAd(@NonNull() VideoAd videoAd)Starts playing ad abstract voidpauseAd(@NonNull() VideoAd videoAd)Pauses playing ad abstract voidresumeAd(@NonNull() VideoAd videoAd)Resumes playing ad abstract voidstopAd(@NonNull() VideoAd videoAd)Stops playing ad abstract voidskipAd(@NonNull() VideoAd videoAd)Skips playing ad abstract voidsetVolume(@NonNull() VideoAd videoAd, float volume)Sets ad player volume, with 0 being silence and 1 being maximum volume level abstract floatgetVolume(@NonNull() VideoAd videoAd)Gets player volume level in range [0.0, 1. abstract voidreleaseAd(@NonNull() VideoAd videoAd)Releases ad player object abstract voidsetInstreamAdPlayerListener(@Nullable() InstreamAdPlayerListener instreamAdPlayerListener)Sets listener for ad player events. abstract longgetAdDuration(@NonNull() VideoAd videoAd)Gets ad video duration abstract longgetAdPosition(@NonNull() VideoAd videoAd)Gets current ad video position abstract booleanisPlayingAd(@NonNull() VideoAd videoAd)Gets value indicating whether player is playing ad -
-
Method Detail
-
prepareAd
abstract void prepareAd(@NonNull() 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 void playAd(@NonNull() VideoAd videoAd)
Starts playing ad
- Parameters:
videoAd- object providing information about the advertising video file to be played.
-
pauseAd
abstract void pauseAd(@NonNull() VideoAd videoAd)
Pauses playing ad
- Parameters:
videoAd- object providing information about the advertising video file to be played.
-
resumeAd
abstract void resumeAd(@NonNull() VideoAd videoAd)
Resumes playing ad
- Parameters:
videoAd- object providing information about the advertising video file to be played.
-
stopAd
abstract void stopAd(@NonNull() VideoAd videoAd)
Stops playing ad
- Parameters:
videoAd- object providing information about the advertising video file to be played.
-
skipAd
abstract void skipAd(@NonNull() VideoAd videoAd)
Skips playing ad
- Parameters:
videoAd- object providing information about the advertising video file to be played.
-
setVolume
abstract void setVolume(@NonNull() 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(@NonNull() 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 void releaseAd(@NonNull() VideoAd videoAd)
Releases ad player object
- Parameters:
videoAd- object providing information about the advertising video file to be played.
-
setInstreamAdPlayerListener
abstract void setInstreamAdPlayerListener(@Nullable() 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(@NonNull() VideoAd videoAd)
Gets ad video duration
- Parameters:
videoAd- object providing information about the advertising video file to be played.
-
getAdPosition
abstract long getAdPosition(@NonNull() VideoAd videoAd)
Gets current ad video position
- Parameters:
videoAd- object providing information about the advertising video file to be played.
-
isPlayingAd
abstract boolean isPlayingAd(@NonNull() VideoAd videoAd)
Gets value indicating whether player is playing ad
- Parameters:
videoAd- object providing information about the advertising video file to be played.
-
-
-
-