Fix TV controls nav after scrub; bump Play release to TV 0.14.49 and mobile 1.0.22.
This commit is contained in:
parent
d9785975e0
commit
93d96d7bb1
3 changed files with 49 additions and 24 deletions
|
|
@ -20,8 +20,8 @@ android {
|
|||
applicationId = "nl.vonas.mediacluster"
|
||||
minSdk = 24
|
||||
targetSdk = 36
|
||||
versionCode = 22
|
||||
versionName = "1.0.21"
|
||||
versionCode = 23
|
||||
versionName = "1.0.22"
|
||||
buildConfigField("String", "DEFAULT_API_BASE", "\"https://master.vonas.nl\"")
|
||||
ndk {
|
||||
abiFilters += listOf("arm64-v8a", "armeabi-v7a")
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ android {
|
|||
applicationId = "nl.vonas.mediacluster.tv"
|
||||
minSdk = 24
|
||||
targetSdk = 36
|
||||
versionCode = 110
|
||||
versionName = "0.14.47"
|
||||
versionCode = 112
|
||||
versionName = "0.14.49"
|
||||
buildConfigField("String", "DEFAULT_API_BASE", "\"https://master.vonas.nl\"")
|
||||
ndk {
|
||||
abiFilters += listOf("arm64-v8a", "armeabi-v7a")
|
||||
|
|
|
|||
|
|
@ -422,10 +422,14 @@ fun PlayerScreen(
|
|||
}
|
||||
|
||||
LaunchedEffect(controls, menu, controlsNavMode) {
|
||||
delay(40)
|
||||
delay(60)
|
||||
if (menu != null) return@LaunchedEffect
|
||||
when {
|
||||
controls && controlsNavMode -> runCatching { controlsFocus.requestFocus() }
|
||||
controls && controlsNavMode -> {
|
||||
// Even wachten tot knoppen gecomposeerd zijn.
|
||||
delay(40)
|
||||
runCatching { controlsFocus.requestFocus() }
|
||||
}
|
||||
else -> runCatching { catcherFocus.requestFocus() }
|
||||
}
|
||||
}
|
||||
|
|
@ -475,13 +479,15 @@ fun PlayerScreen(
|
|||
true
|
||||
}
|
||||
Key.DirectionLeft -> {
|
||||
// Altijd scrubben (ook mét controls zichtbaar) — nooit door knoppen navigeren.
|
||||
if (menu != null) return@onPreviewKeyEvent false
|
||||
// In knoppenmodus: laat focus tussen knoppen bewegen.
|
||||
if (controls && controlsNavMode) return@onPreviewKeyEvent false
|
||||
scrubBy(-10_000)
|
||||
true
|
||||
}
|
||||
Key.DirectionRight -> {
|
||||
if (menu != null) return@onPreviewKeyEvent false
|
||||
if (controls && controlsNavMode) return@onPreviewKeyEvent false
|
||||
scrubBy(10_000)
|
||||
true
|
||||
}
|
||||
|
|
@ -501,14 +507,22 @@ fun PlayerScreen(
|
|||
}
|
||||
Key.DirectionUp, Key.Menu -> {
|
||||
if (menu != null) return@onPreviewKeyEvent false
|
||||
if (controls && controlsNavMode) {
|
||||
when {
|
||||
controls && controlsNavMode -> {
|
||||
// Terug naar scrub-modus; ←/→ seeken weer.
|
||||
controlsNavMode = false
|
||||
true
|
||||
} else {
|
||||
}
|
||||
controls -> {
|
||||
hideControls()
|
||||
true
|
||||
}
|
||||
else -> {
|
||||
showControls(navMode = false)
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
else -> false
|
||||
}
|
||||
},
|
||||
|
|
@ -683,13 +697,16 @@ fun PlayerScreen(
|
|||
}
|
||||
|
||||
Row(
|
||||
Modifier
|
||||
.fillMaxWidth()
|
||||
.focusRequester(controlsFocus),
|
||||
Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
NetflixIconButton(if (playing) "❚❚" else "▶", primary = true) { togglePlay() }
|
||||
NetflixIconButton(
|
||||
label = if (playing) "❚❚" else "▶",
|
||||
primary = true,
|
||||
focusRequester = controlsFocus,
|
||||
onClick = { togglePlay() },
|
||||
)
|
||||
NetflixIconButton("−10") {
|
||||
scrubBy(-10_000)
|
||||
}
|
||||
|
|
@ -709,16 +726,18 @@ fun PlayerScreen(
|
|||
showControls(navMode = true)
|
||||
}
|
||||
}
|
||||
if (!controlsNavMode && scrubHint == null) {
|
||||
Text(
|
||||
"← → spoelen · ↓ knoppen · OK pauze",
|
||||
if (controlsNavMode) {
|
||||
"← → knoppen · ↑ terug naar spoelen · OK kiezen"
|
||||
} else {
|
||||
"← → spoelen · ↓ knoppen (audio/ondertitel) · OK pauze"
|
||||
},
|
||||
color = Color(0x88FFFFFF),
|
||||
fontSize = 12.sp,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (showNextOverlay && nextEp != null) {
|
||||
val n = nextEp!!
|
||||
|
|
@ -877,10 +896,16 @@ private fun langLabel(code: String): String {
|
|||
private fun NetflixIconButton(
|
||||
label: String,
|
||||
primary: Boolean = false,
|
||||
focusRequester: FocusRequester? = null,
|
||||
onClick: () -> Unit,
|
||||
) {
|
||||
Surface(
|
||||
onClick = onClick,
|
||||
modifier = if (focusRequester != null) {
|
||||
Modifier.focusRequester(focusRequester)
|
||||
} else {
|
||||
Modifier
|
||||
},
|
||||
shape = ClickableSurfaceDefaults.shape(shape = CircleShape),
|
||||
scale = ClickableSurfaceDefaults.scale(focusedScale = 1.12f),
|
||||
border = ClickableSurfaceDefaults.border(
|
||||
|
|
|
|||
Loading…
Reference in a new issue