Package com.my.target.instreamads
Interface InstreamAdPlayer
-
public interface InstreamAdPlayerThis interface must be implemented in advertisement videoplayer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceInstreamAdPlayer.AdPlayerListenerCalls from this listener must be implemented in videoplayer for calculating video ad statistics
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddestroy()Shutdown all connections and release all resourcesInstreamAdPlayer.AdPlayerListenergetAdPlayerListener()floatgetAdVideoDuration()Retrieving duration of current playing advertising videofloatgetAdVideoPosition()Retrieving play time left of current playing advertising videoandroid.view.ViewgetView()voidpauseAdVideo()Call player to pause current playing advoidplayAdVideo(android.net.Uri uri, int width, int height)Call player to play videofile or stream with predefined dimensionsvoidplayAdVideo(android.net.Uri uri, int width, int height, float position)Call player to play videofile or stream with predefined dimensionsvoidresumeAdVideo()Call player to resume current playing advoidsetAdPlayerListener(InstreamAdPlayer.AdPlayerListener listener)Sets listener for ad playing eventsvoidsetVolume(float volume)Setting the volumevoidstopAdVideo()Call player to stop current video ad.
-
-
-
Method Detail
-
getAdPlayerListener
@Nullable InstreamAdPlayer.AdPlayerListener getAdPlayerListener()
-
getAdVideoDuration
float getAdVideoDuration()
Retrieving duration of current playing advertising video
-
getAdVideoPosition
float getAdVideoPosition()
Retrieving play time left of current playing advertising video
-
getView
@NonNull android.view.View getView()
- Returns:
- view, that hosts the player
-
setAdPlayerListener
void setAdPlayerListener(@Nullable InstreamAdPlayer.AdPlayerListener listener)Sets listener for ad playing events- Parameters:
listener- listener should be set
-
playAdVideo
void playAdVideo(@NonNull android.net.Uri uri, int width, int height)Call player to play videofile or stream with predefined dimensions- Parameters:
uri- URI of video of streamwidth- width of video in pixelsheight- height of video in pixels
-
playAdVideo
void playAdVideo(@NonNull android.net.Uri uri, int width, int height, float position)Call player to play videofile or stream with predefined dimensions- Parameters:
uri- URI of video of streamwidth- width of video in pixelsheight- height of video in pixelsposition- position of video. Used after swap
-
pauseAdVideo
void pauseAdVideo()
Call player to pause current playing ad
-
resumeAdVideo
void resumeAdVideo()
Call player to resume current playing ad
-
stopAdVideo
void stopAdVideo()
Call player to stop current video ad. This call means we don't plan start same video ad in this player
-
destroy
void destroy()
Shutdown all connections and release all resources
-
setVolume
void setVolume(float volume)
Setting the volume- Parameters:
volume- volume
-
-