public interface POBVideoPlayer
| Modifier and Type | Interface and Description |
|---|---|
static class |
POBVideoPlayer.SupportedMediaType
Enum for mime types supported by
POBVideoPlayerView |
static class |
POBVideoPlayer.VideoPlayerState
States of Video player
|
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_STALLING_TIMEOUT
Timeout in milliseconds for maximum stall duration for buffering.
|
static int |
MEDIA_FILE_TIMEOUT_ERROR
This error code is for timeout while loading the media playing
|
static int |
RUNTIME_ERROR
This error code is referred as any runtime error after playback started
|
static POBVideoPlayer.SupportedMediaType[] |
SUPPORTED_MEDIA_TYPE
List of supported media types by
MediaPlayer |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Method to do resource cleanup
|
POBPlayerController |
getControllerView()
Returns the player controller view instance
|
int |
getMediaDuration()
Gets the duration of the media.
|
POBVideoPlayer.VideoPlayerState |
getPlayerState() |
boolean |
isMute()
Gets audio mute status
|
void |
load(java.lang.String uri)
Loads the video content for given Uri
|
void |
mute()
Mute audio of VideoPlayer
|
void |
pause()
Pauses current playback.
|
void |
play()
Signals Video player to begin playback.
|
void |
playOnMute(boolean mute)
Set playOnMute to handle video playback with mute/unmute.
|
void |
setAutoPlayOnForeground(boolean autoPlayOnForeground)
Property to auto-play the video when comes in background
|
void |
setControllerView(POBPlayerController videoPlayerControl,
android.widget.FrameLayout.LayoutParams layoutParams)
Register to controller view to add controller view on Video Player with layoutParams properties
|
void |
setListener(POBVideoPlayerView.POBVideoPlayerListener listener)
Register listener to get Video Player callbacks
|
void |
setPrepareTimeout(int timeout)
Set prepare timeout to handle MediaPlayer url loading.
|
void |
stop()
Stops playback after playback has been onStart or onPause.
|
void |
unMute()
Un-mute audio of VideoPlayer if already muted
|
static final int MAX_STALLING_TIMEOUT
static final int MEDIA_FILE_TIMEOUT_ERROR
static final int RUNTIME_ERROR
static final POBVideoPlayer.SupportedMediaType[] SUPPORTED_MEDIA_TYPE
MediaPlayervoid load(@NonNull
java.lang.String uri)
uri - the Uri from which to get the video content or data sourcevoid play()
load(String).void pause()
void setListener(@NonNull
POBVideoPlayerView.POBVideoPlayerListener listener)
listener - reference of POBVideoPlayerView.POBVideoPlayerListener, see POBVideoPlayerView.POBVideoPlayerListener@Nullable POBPlayerController getControllerView()
void setControllerView(@NonNull
POBPlayerController videoPlayerControl,
@NonNull
android.widget.FrameLayout.LayoutParams layoutParams)
videoPlayerControl - reference of POBVideoPlayerListenerlayoutParams - layout params propertiesvoid stop()
void mute()
void unMute()
boolean isMute()
int getMediaDuration()
void setAutoPlayOnForeground(boolean autoPlayOnForeground)
autoPlayOnForeground - boolean valuevoid destroy()
void setPrepareTimeout(int timeout)
load(String)timeout - the timeout value in milliseconds.void playOnMute(boolean mute)
play()mute - the mute value on boolean@NonNull POBVideoPlayer.VideoPlayerState getPlayerState()