Interface POBVideoPlayer
-
- All Implemented Interfaces:
public interface POBVideoPlayerProtocol, provides methods for basic functionality and events of video player like play,pause,etc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumPOBVideoPlayer.VideoPlayerStateStates of Video player
public enumPOBVideoPlayer.SupportedMediaTypeEnum for mime types supported by POBVideoPlayerView
-
Method Summary
Modifier and Type Method Description abstract voidload(@NonNull() String uri)Loads the video content for given Uri abstract voidplay()Signals Video player to begin playback. abstract voidpause()Pauses current playback. abstract voidsetListener(@NonNull() POBVideoPlayerView.POBVideoPlayerListener listener)Register listener to get Video Player callbacks abstract POBPlayerControllergetControllerView()Returns the player controller view instance abstract voidsetControllerView(@NonNull() POBPlayerController videoPlayerControl, @NonNull() FrameLayout.LayoutParams layoutParams)Register to controller view to add controller view on Video Player with layoutParams properties abstract voidstop()Stops playback after playback has been onStart or onPause. abstract voidmute()Mute audio of VideoPlayer abstract voidunMute()Un-mute audio of VideoPlayer if already muted abstract booleanisMute()Gets audio mute status abstract intgetMediaDuration()Gets the duration of the media. abstract voidsetAutoPlayOnForeground(boolean autoPlayOnForeground)Property to auto-play the video when comes in background abstract voiddestroy()Method to do resource cleanup abstract voidsetPrepareTimeout(int timeout)Set prepare timeout to handle MediaPlayer url loading. abstract voidplayOnMute(boolean mute)Set playOnMute to handle video playback with mute/unmute. abstract POBVideoPlayer.VideoPlayerStategetPlayerState()-
-
Method Detail
-
load
abstract void load(@NonNull() String uri)
Loads the video content for given Uri
- Parameters:
uri- the Uri from which to get the video content or data source
-
play
abstract void play()
Signals Video player to begin playback. Before calling this method, call load See load.
-
pause
abstract void pause()
Pauses current playback.
-
setListener
abstract void setListener(@NonNull() POBVideoPlayerView.POBVideoPlayerListener listener)
Register listener to get Video Player callbacks
- Parameters:
listener- reference of POBVideoPlayerView.
-
getControllerView
@Nullable() abstract POBPlayerController getControllerView()
Returns the player controller view instance
- Returns:
POBPlayerController instance
-
setControllerView
abstract void setControllerView(@NonNull() POBPlayerController videoPlayerControl, @NonNull() FrameLayout.LayoutParams layoutParams)
Register to controller view to add controller view on Video Player with layoutParams properties
- Parameters:
videoPlayerControl- reference of POBVideoPlayerListenerlayoutParams- layout params properties
-
stop
abstract void stop()
Stops playback after playback has been onStart or onPause.
-
mute
abstract void mute()
Mute audio of VideoPlayer
-
unMute
abstract void unMute()
Un-mute audio of VideoPlayer if already muted
-
isMute
abstract boolean isMute()
Gets audio mute status
- Returns:
true if audio is Mute else return false
-
getMediaDuration
abstract int getMediaDuration()
Gets the duration of the media.
- Returns:
the duration in milliseconds, if no duration is available (for example, if streaming live content), -1 is returned.
-
setAutoPlayOnForeground
abstract void setAutoPlayOnForeground(boolean autoPlayOnForeground)
Property to auto-play the video when comes in background
- Parameters:
autoPlayOnForeground- boolean value
-
destroy
abstract void destroy()
Method to do resource cleanup
-
setPrepareTimeout
abstract void setPrepareTimeout(int timeout)
Set prepare timeout to handle MediaPlayer url loading. Only reflect if set before load method. See load
- Parameters:
timeout- the timeout value in milliseconds.
-
playOnMute
abstract void playOnMute(boolean mute)
Set playOnMute to handle video playback with mute/unmute. If set to true playback starts with mute, else playback starts with unmute or sound-on. Only reflect if set before play method. See play
- Parameters:
mute- the mute value on boolean
-
getPlayerState
@NonNull() abstract POBVideoPlayer.VideoPlayerState getPlayerState()
-
-
-
-