Skip to content

Commit

Permalink
change default max content ratio to 3/1
Browse files Browse the repository at this point in the history
  • Loading branch information
theScrabi committed Nov 1, 2024
1 parent e5099db commit 9efa1dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,19 @@ internal fun PlaySurface(

// actual calculation of the aspect ratio

if (uiState.uiMode.fullscreen && uiState.contentFitMode == ContentScale.STRETCHED)
if (uiState.uiMode.fullscreen && fitMode == ContentScale.STRETCHED)
ActualView(modifier.fillMaxSize(), player)
else
ActualView(modifier.aspectRatio(contentRatio), player)
else {
val modifier = modifier.aspectRatio(contentRatio)
if (uiRatio <= contentRatio) {
ActualView(modifier.fillMaxWidth(), player)
} else {
ActualView(modifier.fillMaxHeight(), player)
}


/*
if (uiRatio <= contentRatio) {
internalModifier.fillMaxWidth()
} else {
internalModifier.fillMaxHeight()
}

*/

}

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class NewPlayerViewModelImpl @Inject constructor(
private var playlistProgressUpdaterJob: Job? = null
private var updatePreviewThumbnailJob: Job? = null

// this is necesary to restore the embedded view UI configuration when returning from fullscreen
// this is necessary to restore the embedded view UI configuration when returning from fullscreen
private var embeddedUiConfig: EmbeddedUiConfig? = null

private var playbackPositionWhenFastSeekStarted = 0L
Expand Down Expand Up @@ -116,7 +116,7 @@ class NewPlayerViewModelImpl @Inject constructor(
}


override var maxContentRatio: Float = 16F / 9F
override var maxContentRatio: Float = 3F / 1F
set(value) {
if (value <= 0 || value < minContentRatio) Log.e(
TAG,
Expand Down

0 comments on commit 9efa1dd

Please sign in to comment.