Package com.my.target.instreamads
Interface InstreamAdPlayer
-
- All Implemented Interfaces:
public interface InstreamAdPlayerThis interface must be implemented in advertisement videoplayer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceInstreamAdPlayer.AdPlayerListenerCalls from this listener must be implemented in videoplayer for calculating video ad statistics
-
Method Summary
Modifier and Type Method Description abstract voiddestroy()Shutdown all connections and release all resources abstract InstreamAdPlayer.AdPlayerListenergetAdPlayerListener()abstract floatgetAdVideoDuration()Retrieving duration of current playing advertising video abstract floatgetAdVideoPosition()Retrieving play time left of current playing advertising video abstract ViewgetView()abstract voidpauseAdVideo()Call player to pause current playing ad abstract voidplayAdVideo(@NonNull() Uri uri, int width, int height)Call player to play videofile or stream with predefined dimensions abstract voidplayAdVideo(@NonNull() Uri uri, int width, int height, float position)Call player to play videofile or stream with predefined dimensions abstract voidresumeAdVideo()Call player to resume current playing ad abstract voidsetAdPlayerListener(@Nullable() InstreamAdPlayer.AdPlayerListener listener)Sets listener for ad playing events abstract voidsetVolume(float volume)Setting the volume abstract voidstopAdVideo()Call player to stop current video ad. -
-
Method Detail
-
destroy
abstract void destroy()
Shutdown all connections and release all resources
-
getAdPlayerListener
@Nullable() abstract InstreamAdPlayer.AdPlayerListener getAdPlayerListener()
-
getAdVideoDuration
abstract float getAdVideoDuration()
Retrieving duration of current playing advertising video
-
getAdVideoPosition
abstract float getAdVideoPosition()
Retrieving play time left of current playing advertising video
-
getView
@NonNull() abstract View getView()
- Returns:
view, that hosts the player
-
pauseAdVideo
abstract void pauseAdVideo()
Call player to pause current playing ad
-
playAdVideo
abstract void playAdVideo(@NonNull() 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
abstract void playAdVideo(@NonNull() 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.
-
resumeAdVideo
abstract void resumeAdVideo()
Call player to resume current playing ad
-
setAdPlayerListener
abstract void setAdPlayerListener(@Nullable() InstreamAdPlayer.AdPlayerListener listener)
Sets listener for ad playing events
- Parameters:
listener- listener should be set
-
setVolume
abstract void setVolume(float volume)
Setting the volume
- Parameters:
volume- volume
-
stopAdVideo
abstract void stopAdVideo()
Call player to stop current video ad. This call means we don't plan start same video ad in this player
-
-
-
-