We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to know how to play multi-exoplayer like this picture [explain]
fun MultiPlayerScreen(){ Column(){ VideoScreen() // 1 videoScreen() //2 } } ----------------------------------------------------------------------------------------------------------------------------------- const val MIME_TYPE_DASH = MimeTypes.APPLICATION_MPD const val MIME_TYPE_HLS = MimeTypes.APPLICATION_M3U8 const val MIME_TYPE_VIDEO_MP4 = MimeTypes.VIDEO_MP4 @Composable fun VideoScreen( onChangeView : () -> Unit, durationTime : Long = 8000L, ){ val currentChangeView by rememberUpdatedState(newValue = onChangeView) var repeatMode by remember { mutableStateOf(RepeatMode.ALL) } val context = LocalContext.current LaunchedEffect(Unit){ delay(durationTime) if(durationTime != 0L) currentChangeView() } VideoPlayer( mediaItems = listOf( VideoPlayerMediaItem.NetworkMediaItem( url = "https://html5demos.com/assets/dizzy.mp4", mediaMetadata = MediaMetadata.Builder().setTitle("Clear MP4: Dizzy").build(), mimeType = MIME_TYPE_VIDEO_MP4, ) ), handleLifecycle = true, autoPlay = true, usePlayerController = true, enablePip = true, handleAudioFocus = true, controllerConfig = VideoPlayerControllerConfig.Default.copy( showSpeedAndPitchOverlay = false, showSubtitleButton = false, showCurrentTimeAndTotalTime = true, showBufferingProgress = false, showForwardIncrementButton = true, showBackwardIncrementButton = true, showBackTrackButton = true, showNextTrackButton = true, showRepeatModeButton = true, controllerShowTimeMilliSeconds = 5_000, controllerAutoShow = true, showFullScreenButton = false ), volume = 0.5f, // volume 0.0f to 1.0f repeatMode = repeatMode, // or RepeatMode.ALL, RepeatMode.ONE onCurrentTimeChanged = { // long type, current player time (millisec) Log.e("CurrentTime", it.toString()) }, playerInstance = { // ExoPlayer instance (Experimental) addAnalyticsListener(object : AnalyticsListener { @SuppressLint("UnsafeOptInUsageError") override fun onRepeatModeChanged( eventTime: AnalyticsListener.EventTime, rMode: Int, ) { repeatMode = rMode.toRepeatMode() Toast.makeText( context, "RepeatMode changed = ${rMode.toRepeatMode()}", Toast.LENGTH_LONG, ) .show() } @SuppressLint("UnsafeOptInUsageError") override fun onPlayWhenReadyChanged( eventTime: AnalyticsListener.EventTime, playWhenReady: Boolean, reason: Int, ) { Toast.makeText( context, "isPlaying = $playWhenReady", Toast.LENGTH_LONG, ) .show() } @SuppressLint("UnsafeOptInUsageError") override fun onVolumeChanged( eventTime: AnalyticsListener.EventTime, volume: Float, ) { Toast.makeText( context, "Player volume changed = $volume", Toast.LENGTH_LONG, ) .show() } } ) }, modifier = Modifier .fillMaxSize() // .align(Alignment.Center), ) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to know how to play multi-exoplayer like this picture
[explain]
The text was updated successfully, but these errors were encountered: