Skip to content

Commit

Permalink
Make PiP window aspect ratio more wide/short
Browse files Browse the repository at this point in the history
  • Loading branch information
arkon committed May 19, 2024
1 parent 9e521da commit 10c841c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.livetl.android.ui.screen.player.composable

import android.app.PictureInPictureParams
import android.os.Build
import android.util.Rational
import androidx.annotation.StringRes
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.layout.Arrangement
Expand Down Expand Up @@ -158,7 +159,10 @@ private fun FullPlayerTab(
Button(
onClick = {
context.findActivity().enterPictureInPictureMode(
PictureInPictureParams.Builder().build(),
PictureInPictureParams.Builder()
// Must be between 2.39:1 and 1:2.39 (inclusive)
.setAspectRatio(Rational(239, 100))
.build(),
)
uriHandler.openUri("https://www.youtube.com/watch?v=${streamInfo?.videoId}")
},
Expand Down

0 comments on commit 10c841c

Please sign in to comment.