-
-
Save skydoves/05e09b27a341273d858bea0a17f49e29 to your computer and use it in GitHub Desktop.
video_renderer_call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun VideoRendererCallContent( | |
call: Call, | |
video: ParticipantState.Video, | |
onRendered: (View) -> Unit = {}, | |
) { | |
VideoRenderer( | |
modifier = Modifier | |
.fillMaxSize() | |
.background(VideoTheme.colors.baseSheetTertiary), // use pre-defined color styles | |
call = call, | |
video = video, | |
onRendered = onRendered, | |
) | |
} | |
@Composable | |
fun MyScreen() { | |
VideoRendererCallContent(..) | |
// some complicated components | |
} | |
class MainActivity : ComponentActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContent { | |
VideoTheme { | |
MyScreen() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment