UIController

fun UIController(modifier: Modifier = Modifier, config: THEOplayerConfig, source: SourceDescription? = null, color: Color = Color.Black.copy(alpha = 0.5f), centerOverlay: @Composable UIControllerScope.() -> Unit? = null, errorOverlay: @Composable UIControllerScope.() -> Unit? = null, topChrome: @Composable UIControllerScope.() -> Unit? = null, centerChrome: @Composable UIControllerScope.() -> Unit? = null, bottomChrome: @Composable UIControllerScope.() -> Unit? = null)(source)

A TV-oriented UI controller for a THEOplayer view.

This creates a THEOplayerView with the given config that follows the lifecycle of the composition, and loads the given source into its player.

Parameters

modifier

the Modifier to be applied to this controller

config

the player configuration to be used when constructing the THEOplayerView

source

the source description to load into the player

color

the background color behind visible controls

centerOverlay

content displayed over the center of the player

errorOverlay

content displayed when the player encounters a fatal error

topChrome

controls displayed at the top of the player

centerChrome

controls displayed at the center of the player

bottomChrome

controls displayed at the bottom of the player


fun UIController(modifier: Modifier = Modifier, theoplayerView: THEOplayerView, color: Color = Color.Black.copy(alpha = 0.5f), centerOverlay: @Composable UIControllerScope.() -> Unit? = null, errorOverlay: @Composable UIControllerScope.() -> Unit? = null, topChrome: @Composable UIControllerScope.() -> Unit? = null, centerChrome: @Composable UIControllerScope.() -> Unit? = null, bottomChrome: @Composable UIControllerScope.() -> Unit? = null)(source)

A TV-oriented UI controller for a THEOplayer view.

This does not touch the lifecycle of the given view: use rememberTHEOplayerView to create a view owned by the composition, or forward THEOplayerView.onPause, THEOplayerView.onResume and THEOplayerView.onDestroy yourself.

Parameters

modifier

the Modifier to be applied to this controller

theoplayerView

the THEOplayer view to host

color

the background color behind visible controls

centerOverlay

content displayed over the center of the player

errorOverlay

content displayed when the player encounters a fatal error

topChrome

controls displayed at the top of the player

centerChrome

controls displayed at the center of the player

bottomChrome

controls displayed at the bottom of the player