ApiVideoPlayerController

constructor(context: Context, initialVideoOptions: VideoOptions? = null, initialAutoplay: Boolean = false, listener: ApiVideoPlayerController.Listener? = null, playerView: ApiVideoExoPlayerView, looper: Looper = Looper.myLooper() ?: Looper.getMainLooper(), notificationController: ApiVideoPlayerNotificationController? = ApiVideoPlayerNotificationController( context ))

Creates a new controller with an ApiVideoExoPlayerView.

Parameters

context

the application context

initialVideoOptions

initial video options

initialAutoplay

initial autoplay: true to play the video immediately, false otherwise

listener

the ApiVideoPlayerController.Listener to listen to player events

playerView

the player view

looper

the looper where call to the player are executed. By default, it is the current looper or the main looper.


constructor(context: Context, initialVideoOptions: VideoOptions? = null, initialAutoplay: Boolean = false, listener: ApiVideoPlayerController.Listener? = null, playerView: PlayerView, looper: Looper = Looper.myLooper() ?: Looper.getMainLooper(), notificationController: ApiVideoPlayerNotificationController? = ApiVideoPlayerNotificationController( context ))

Creates a new controller with a media3 PlayerView.

Parameters

context

the application context

initialVideoOptions

initial video options

initialAutoplay

initial autoplay: true to play the video immediately, false otherwise

listener

the ApiVideoPlayerController.Listener to listen to player events

playerView

the PlayerView to use to display the player

looper

the looper where call to the player are executed. By default, it is the current looper or the main looper.


constructor(context: Context, initialVideoOptions: VideoOptions? = null, initialAutoplay: Boolean = false, listener: ApiVideoPlayerController.Listener? = null, surfaceView: SurfaceView, looper: Looper = Looper.myLooper() ?: Looper.getMainLooper(), notificationController: ApiVideoPlayerNotificationController? = ApiVideoPlayerNotificationController( context ))

Creates a new controller with a SurfaceView.

Parameters

context

the application context

initialVideoOptions

initial video options

initialAutoplay

initial autoplay: true to play the video immediately, false otherwise

listener

the ApiVideoPlayerController.Listener to listen to player events

surfaceView

the SurfaceView to use to display the video

looper

the looper where call to the player are executed. By default, it is the current looper or the main looper.


constructor(context: Context, initialVideoOptions: VideoOptions? = null, initialAutoplay: Boolean = false, listener: ApiVideoPlayerController.Listener? = null, surface: Surface, looper: Looper = Looper.myLooper() ?: Looper.getMainLooper(), notificationController: ApiVideoPlayerNotificationController? = ApiVideoPlayerNotificationController( context ))

Creates a new controller with a Surface.

Parameters

context

the application context

initialVideoOptions

initial video options

initialAutoplay

initial autoplay: true to play the video immediately, false otherwise

listener

the ApiVideoPlayerController.Listener to listen to player events

surface

the Surface to use to display the video

looper

the looper where call to the player are executed. By default, it is the current looper or the main looper.


constructor(context: Context, initialVideoOptions: VideoOptions? = null, initialAutoplay: Boolean = false, listener: ApiVideoPlayerController.Listener? = null, looper: Looper = Looper.myLooper() ?: Looper.getMainLooper(), notificationController: ApiVideoPlayerNotificationController? = ApiVideoPlayerNotificationController( context ))

Creates a new controller without a view.

Parameters

context

the application context

initialVideoOptions

initial video options

initialAutoplay

initial autoplay: true to play the video immediately, false otherwise

listener

a ApiVideoPlayerController.Listener to listen to player events

looper

the looper where call to the player are executed. By default, it is the current looper or the main looper.