Skip to content

Instantly share code, notes, and snippets.

@skydoves
Last active January 23, 2025 02:34
Show Gist options
  • Save skydoves/05e09b27a341273d858bea0a17f49e29 to your computer and use it in GitHub Desktop.
Save skydoves/05e09b27a341273d858bea0a17f49e29 to your computer and use it in GitHub Desktop.
video_renderer_call
@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