fix: video modifier order

This commit is contained in:
Diego Beraldin 2024-04-30 21:41:39 +02:00
parent 98656fd356
commit 065c89f5ac
4 changed files with 4 additions and 5 deletions

View File

@ -24,8 +24,8 @@ import androidx.media3.ui.PlayerView
@OptIn(UnstableApi::class)
@Composable
actual fun VideoPlayer(
modifier: Modifier,
url: String,
modifier: Modifier,
onPlaybackStarted: (() -> Unit)?,
) {
val context = LocalContext.current

View File

@ -9,7 +9,7 @@ import androidx.compose.ui.Modifier
*/
@Composable
expect fun VideoPlayer(
modifier: Modifier,
url: String,
modifier: Modifier = Modifier,
onPlaybackStarted: (() -> Unit)? = null,
)

View File

@ -22,8 +22,8 @@ import platform.UIKit.UIView
@OptIn(ExperimentalForeignApi::class)
@Composable
actual fun VideoPlayer(
modifier: Modifier,
url: String,
modifier: Modifier,
onPlaybackStarted: (() -> Unit)?,
) {
val player = remember { AVPlayer(uRL = NSURL.URLWithString(url)!!) }

View File

@ -41,8 +41,7 @@ fun PostCardVideo(
Box(
modifier = modifier
.fillMaxWidth()
.aspectRatio(
1.33f)
.aspectRatio(1.33f)
.onClick(),
contentAlignment = Alignment.Center,
) {