-
-
Save skydoves/321af7edd7d71e1f8e35055e405b76df to your computer and use it in GitHub Desktop.
video_renderer_style
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
@Immutable | |
public data class VideoRendererStyle( | |
val backgroundColor: Color = Color.Black, | |
.. | |
) | |
private val LocalVideoRendererStyle = compositionLocalOf<VideoRendererStyle> { | |
error("No VideoRendererStyle provided! Make sure to wrap all usages of Stream components in a VideoTheme.") | |
} | |
@Composable | |
public fun VideoTheme( | |
videoRendererStyle: VideoRendererStyle = VideoRendererStyle(), | |
content: @Composable () -> Unit, | |
) { | |
CompositionLocalProvider( | |
LocalVideoRendererStyle provides videoRendererStyle, | |
) { | |
content() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment