PlayerView
A view that provides the Bitmovin Player Web UI and default UI handling to an attached Player instance. A Player with a custom PlayerConfig can be provided. If no player is provided, a player with a default PlayerConfig will be created. In order to not create such a default player, null
can be passed in the constructor.
When inflating this view, a player with a default PlayerConfig will be created. In order to inflate without a player, initialize_player
can be set to false
in the XML layout.
Constructors
Properties
Configures the visual presentation and behaviour of this PlayerView.
Functions
The player enters fullscreen mode. Has no effect if already in fullscreen.
The player enters Picture-In-Picture (PiP) mode. Has no effect if isPictureInPictureAvailable returns false
or view is already in PiP mode.
The player exits fullscreen mode. Has no effect if not in fullscreen.
The player exits Picture-In-Picture (PiP) mode. Has no effect if .isPictureInPictureAvailable returns false
or view is currently not in PiP mode.
Returns the current `ScalingMode`.
Returns true
if the player is currently in fullscreen mode.
Returns true
if a PictureInPictureHandler is registered and PictureInPictureHandler.isPictureInPicture evaluates to true
.
Returns true
if a PictureInPictureHandler is registered and PictureInPictureHandler.isPictureInPictureAvailable evaluates to true
.
Returns if the UI is currently visible.
Must be called when Activity.onDestroy is called in the Activity using this view.
Must be called when Activity.onPause is called in the Activity using this view.
When using Picture-in-Picture feature, this method has to be called from Activity.onPictureInPictureModeChanged method.
Must be called when Activity.onResume is called in the Activity using this view.
Must be called when Activity.onStart is called in the Activity using this view.
Must be called when Activity.onStop is called in the Activity using this view.
Set a CustomMessageHandler which handles the communication with the Bitmovin Web UI in both directions
Set a PictureInPictureHandler to handle Picture-In-Picture (PiP) mode. Can be set to null
to remove the picture in picture handler. Initially, no PictureInPictureHandler is set.
Sets a poster image which will be displayed before playback starts.
Sets a new `ScalingMode`.
Sets if the UI should be visible or not. Default value is true
.