I am working with Media3 ExoPlayer in Jetpack Compose and I am trying to customize the player's control view. Specifically, I want to disable or remove the progress bar (the one that shows the playing status of the video) and the 15 seconds back and forth buttons in the live mode.
Here is the current implementation of my VideoView function:
@Composable
fun VideoView(video: string?, viewModel: ChannelsViewModel = viewModel()) {
val context = LocalContext.current
if(videoUri == null){
throw Error("error")
}
val exoPlayer = ExoPlayer.Builder(LocalContext.current)
.build()
.also { exoPlayer ->
val mediaItem = MediaItem.Builder()
.setUri(video)
.build()
exoPlayer.setMediaItem(mediaItem)
exoPlayer.prepare()
exoPlayer.playWhenReady = true
}
DisposableEffect(
AndroidView(factory = {
PlayerView(context).apply {
player = exoPlayer
layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT)
}
})
)
{
onDispose { exoPlayer.release() }
}
}
Thanks in advance for any help you can provide.