File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
src/main/kotlin/dev/silenium/multimedia/compose/player Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import androidx.compose.ui.graphics.Color
1111import androidx.compose.ui.unit.dp
1212import dev.silenium.compose.gl.surface.*
1313import dev.silenium.multimedia.core.annotation.InternalMultimediaApi
14+ import org.jetbrains.skia.Paint
1415
1516@Composable
1617private fun createGLSurface (
@@ -52,12 +53,14 @@ fun VideoSurface(
5253 player : VideoPlayer ,
5354 showStats : Boolean = false,
5455 modifier : Modifier = Modifier ,
56+ paint : Paint = Paint (),
5557) {
5658 val surfaceState = rememberGLSurfaceState()
5759 BoxWithConstraints (modifier = modifier) {
5860 GLSurfaceView (
5961 surface = player.surface!! ,
6062 modifier = Modifier .matchParentSize(),
63+ paint = paint,
6164 )
6265 if (showStats) {
6366 Surface (
Original file line number Diff line number Diff line change @@ -6,13 +6,15 @@ import androidx.compose.runtime.Composable
66import androidx.compose.ui.Alignment
77import androidx.compose.ui.Modifier
88import androidx.compose.ui.focus.FocusRequester
9+ import org.jetbrains.skia.Paint
910
1011@Composable
1112fun VideoSurfaceWithControls (
1213 player : VideoPlayer ,
1314 modifier : Modifier = Modifier ,
1415 showStats : Boolean = false,
1516 controlFocusRequester : FocusRequester ? = null,
17+ paint : Paint = Paint (),
1618) {
1719 BoxWithConstraints (modifier) {
1820 VideoSurface (
@@ -23,6 +25,7 @@ fun VideoSurfaceWithControls(
2325 maxWidth = maxWidth,
2426 maxHeight = maxHeight,
2527 ),
28+ paint = paint,
2629 )
2730 VideoSurfaceControls (player, Modifier .matchParentSize(), controlFocusRequester)
2831 }
You can’t perform that action at this time.
0 commit comments