Skip to content

Instantly share code, notes, and snippets.

@halilozercan
Created August 1, 2020 08:03
Show Gist options
  • Save halilozercan/6d717a6647fa9099b06f3dc11f823e7c to your computer and use it in GitHub Desktop.
Save halilozercan/6d717a6647fa9099b06f3dc11f823e7c to your computer and use it in GitHub Desktop.
@Composable
fun PlayerSurface() {
val playerController = PlayerControllerAmbient.current
AndroidView(resId = R.layout.surface) {
val exoPlayerView = it.findViewById<PlayerView>(R.id.player_view)
playerController.setPlayerView(exoPlayerView)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment