Skip to content

Commit

Permalink
Use texture only with API 34
Browse files Browse the repository at this point in the history
  • Loading branch information
StaehliJ committed Oct 10, 2024
1 parent ef160d4 commit 399be6e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
package ch.srgssr.pillarbox.demo.ui.showcases.layouts

import android.os.Build
import androidx.compose.animation.animateColorAsState
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
Expand Down Expand Up @@ -120,7 +121,7 @@ private fun PlayerView(player: Player, modifier: Modifier = Modifier) {
modifier = Modifier
.fillMaxHeight(),
scaleMode = ScaleMode.Crop,
surfaceType = SurfaceType.Texture,
surfaceType = if (Build.VERSION.SDK_INT == Build.VERSION_CODES.UPSIDE_DOWN_CAKE) SurfaceType.Texture else SurfaceType.Surface,
player = player,
defaultAspectRatio = 9 / 16f,
)
Expand Down

0 comments on commit 399be6e

Please sign in to comment.