mirror of
https://github.com/bbara04/Purefin.git
synced 2026-07-23 19:26:50 +00:00
fix(player): adjust subtitle bottom padding when controls visible
Increase TV controls-visible subtitle bottom padding fraction from 0.22 to 0.31 and update PlayerScreen to reapply player and subtitle padding on recomposition.
This commit is contained in:
@@ -80,7 +80,7 @@ import java.time.format.DateTimeFormatter
|
|||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
private const val TV_CONTROLS_AUTO_HIDE_MS = 5_000L
|
private const val TV_CONTROLS_AUTO_HIDE_MS = 5_000L
|
||||||
private const val CONTROLS_VISIBLE_SUBTITLE_BOTTOM_PADDING_FRACTION = 0.22f
|
private const val CONTROLS_VISIBLE_SUBTITLE_BOTTOM_PADDING_FRACTION = 0.31f
|
||||||
internal const val TV_HIDDEN_STOP_FEEDBACK_MS = 1_200L
|
internal const val TV_HIDDEN_STOP_FEEDBACK_MS = 1_200L
|
||||||
internal const val TvPlayerHiddenStopFeedbackTag = "tv_player_hidden_stop_feedback"
|
internal const val TvPlayerHiddenStopFeedbackTag = "tv_player_hidden_stop_feedback"
|
||||||
|
|
||||||
|
|||||||
@@ -150,6 +150,10 @@ fun PlayerScreen(
|
|||||||
subtitleView?.setBottomPaddingFraction(subtitleBottomPaddingFraction)
|
subtitleView?.setBottomPaddingFraction(subtitleBottomPaddingFraction)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
update = {
|
||||||
|
it.player = viewModel.player
|
||||||
|
it.subtitleView?.setBottomPaddingFraction(subtitleBottomPaddingFraction)
|
||||||
|
},
|
||||||
onRelease = { playerView ->
|
onRelease = { playerView ->
|
||||||
playerView.player = null
|
playerView.player = null
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user