Api Video Player Controller
class ApiVideoPlayerController(context: Context, initialVideoOptions: VideoOptions? = null, initialAutoplay: Boolean = false, listener: ApiVideoPlayerController.Listener? = null, looper: Looper = Looper.myLooper() ?: Looper.getMainLooper(), notificationController: ApiVideoPlayerNotificationController? = ApiVideoPlayerNotificationController(
context
))
The api.video player controller class.
Parameters
context
the application context
initial Video Options
initial video options
initial Autoplay
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.
Constructors
Link copied to clipboard
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.
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.
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.
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.
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.
Types
Properties
Functions
Link copied to clipboard
Add a listener to the player
Link copied to clipboard
Remove a listener
Link copied to clipboard
Sets the player view
Link copied to clipboard
Sets the player view
Link copied to clipboard
Sets the player view
Link copied to clipboard
fun switchTargetView(oldPlayerView: ApiVideoExoPlayerView, newPlayerView: ApiVideoExoPlayerView): <Error class: unknown class>