From a2d6a14ec78a2dd0227ac4a1f5c9674523a5c63a Mon Sep 17 00:00:00 2001 From: Pauljd Date: Thu, 5 Nov 2026 21:34:46 +0000 Subject: [PATCH] 0.108.29: Tots bumpers with the cast; Zip and Blaze cheer a new best Paul, 5 November 2026, next on his list for the cast. Every third Tots changeover (by the next programme's start) plays a drawn bumper instead of the filmed ident, the same length: by day Ollie bounces in over the hills under turning sun rays with Zip zooming past; in the evening Luna rises in a starry sky with drifting z's, "Nearly bedtime" or "Sleepy time". Still pictures with Reduce motion on; the filmed ident and still rules otherwise as before. When a game ends on a new best, Zip and Blaze cheer it on the game-over panel (Star Chase, Snake, Block Drop, Brick Break, Pairs). This also fixes the panel saying "Score" instead of "New best" once the new best had been saved. Co-Authored-By: Claude Opus 5.5 (1M context) --- android/app/build.gradle.kts | 4 +- .../java/tv/orbit/classic/ArcadeBlockDrop.kt | 6 +- .../java/tv/orbit/classic/ArcadeBrickBreak.kt | 6 +- .../java/tv/orbit/classic/ArcadeOrbMan.kt | 6 +- .../main/java/tv/orbit/classic/ArcadePairs.kt | 1 + .../main/java/tv/orbit/classic/CastBumpers.kt | 141 ++++++++++++++++++ .../main/java/tv/orbit/classic/EmbyClient.kt | 2 +- .../src/main/java/tv/orbit/classic/Idents.kt | 2 + .../main/java/tv/orbit/classic/OrbitArcade.kt | 6 +- .../tv/orbit/classic/SecureMediaDataSource.kt | 2 +- 10 files changed, 168 insertions(+), 8 deletions(-) create mode 100644 android/app/src/main/java/tv/orbit/classic/CastBumpers.kt diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index def255ef..bf7eedb3 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -9,8 +9,8 @@ android { applicationId = "tv.orbit.classic" minSdk = 26 targetSdk = 36 - versionCode = 188 - versionName = "0.108.28-ollie" + versionCode = 189 + versionName = "0.108.29-cast-bumpers" } buildFeatures { compose = true } compileOptions { sourceCompatibility = JavaVersion.VERSION_17; targetCompatibility = JavaVersion.VERSION_17 } diff --git a/android/app/src/main/java/tv/orbit/classic/ArcadeBlockDrop.kt b/android/app/src/main/java/tv/orbit/classic/ArcadeBlockDrop.kt index a6a631f4..424d23b3 100644 --- a/android/app/src/main/java/tv/orbit/classic/ArcadeBlockDrop.kt +++ b/android/app/src/main/java/tv/orbit/classic/ArcadeBlockDrop.kt @@ -170,6 +170,9 @@ internal fun BlockDropScreen(best: Int, onBest: (Int) -> Unit, onLeave: () -> Un } val menuFocus = remember { FocusRequester() } LaunchedEffect(paused, game.alive) { if (paused || !game.alive) menuFocus.requestFocus() else focus.requestFocus() } + // The best as it stood while this game was played, so the new best still shows once it's been saved; Zip and Blaze cheer it. + val bestBefore = remember(game.alive) { best } + val newBest = game.score > bestBefore && game.score > 0 BackHandler { if (game.alive) paused = !paused else onLeave() } Row(Modifier.fillMaxSize().background(Navy).padding(20.dp).focusRequester(focus).focusable().onPreviewKeyEvent { event -> val native = event.nativeKeyEvent @@ -202,7 +205,8 @@ internal fun BlockDropScreen(best: Int, onBest: (Int) -> Unit, onLeave: () -> Un BlockField(game, Modifier.fillMaxSize().padding(6.dp)) if (paused || !game.alive) Column(Modifier.background(Navy, RoundedCornerShape(6.dp)).border(2.dp, Honey, RoundedCornerShape(6.dp)).padding(20.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(8.dp)) { Text(if (game.alive) "PAUSED" else "GAME OVER", color = Honey, fontFamily = Marquee, fontSize = 30.sp) - if (!game.alive) Text(if (game.score > best) "New best: ${game.score}" else "Score: ${game.score}", color = Color.White, fontSize = 16.sp) + if (!game.alive && newBest) CastCheer() + if (!game.alive) Text(if (newBest) "New best: ${game.score}" else "Score: ${game.score}", color = Color.White, fontSize = 16.sp) OrbitButton(if (game.alive) "Carry on" else "Play again", Modifier.width(200.dp).focusRequester(menuFocus), onClick = { if (!game.alive) game = BlockGame.start(random) paused = false diff --git a/android/app/src/main/java/tv/orbit/classic/ArcadeBrickBreak.kt b/android/app/src/main/java/tv/orbit/classic/ArcadeBrickBreak.kt index ee20be40..42cb64dc 100644 --- a/android/app/src/main/java/tv/orbit/classic/ArcadeBrickBreak.kt +++ b/android/app/src/main/java/tv/orbit/classic/ArcadeBrickBreak.kt @@ -145,6 +145,9 @@ internal fun BrickBreakScreen(best: Int, onBest: (Int) -> Unit, onLeave: () -> U } val menuFocus = remember { FocusRequester() } LaunchedEffect(paused, game.alive) { if (paused || !game.alive) menuFocus.requestFocus() else focus.requestFocus() } + // The best as it stood while this game was played, so the new best still shows once it's been saved; Zip and Blaze cheer it. + val bestBefore = remember(game.alive) { best } + val newBest = game.score > bestBefore && game.score > 0 BackHandler { if (game.alive) paused = !paused else onLeave() } Row(Modifier.fillMaxSize().background(Navy).padding(20.dp).focusRequester(focus).focusable().onPreviewKeyEvent { event -> val native = event.nativeKeyEvent @@ -175,7 +178,8 @@ internal fun BrickBreakScreen(best: Int, onBest: (Int) -> Unit, onLeave: () -> U if (game.alive && !game.launched && !paused) Text("Press OK to launch", Modifier.align(Alignment.BottomCenter).padding(bottom = 40.dp), color = Honey, fontSize = 16.sp) if (paused || !game.alive) Column(Modifier.background(Navy, RoundedCornerShape(6.dp)).border(2.dp, Honey, RoundedCornerShape(6.dp)).padding(20.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(8.dp)) { Text(if (game.alive) "PAUSED" else "GAME OVER", color = Honey, fontFamily = Marquee, fontSize = 30.sp) - if (!game.alive) Text(if (game.score > best) "New best: ${game.score}" else "Score: ${game.score}", color = Color.White, fontSize = 16.sp) + if (!game.alive && newBest) CastCheer() + if (!game.alive) Text(if (newBest) "New best: ${game.score}" else "Score: ${game.score}", color = Color.White, fontSize = 16.sp) OrbitButton(if (game.alive) "Carry on" else "Play again", Modifier.width(200.dp).focusRequester(menuFocus), onClick = { if (!game.alive) game = BrickGame.start() held = 0; paused = false diff --git a/android/app/src/main/java/tv/orbit/classic/ArcadeOrbMan.kt b/android/app/src/main/java/tv/orbit/classic/ArcadeOrbMan.kt index 3b60905e..cdc6bd81 100644 --- a/android/app/src/main/java/tv/orbit/classic/ArcadeOrbMan.kt +++ b/android/app/src/main/java/tv/orbit/classic/ArcadeOrbMan.kt @@ -479,6 +479,9 @@ internal fun OrbManScreen(best: Int, onBest: (Int) -> Unit, onLeave: () -> Unit) if (!game.alive && game.score > best) onBest(game.score) } LaunchedEffect(paused, game.alive) { if (paused || !game.alive) menuFocus.requestFocus() else focus.requestFocus() } + // The best as it stood while this game was played, so the new best still shows once it's been saved; Zip and Blaze cheer it. + val bestBefore = remember(game.alive) { best } + val newBest = game.score > bestBefore && game.score > 0 BackHandler { if (game.alive) paused = !paused else onLeave() } // The power glow breathes gently; with Reduce motion on it holds steady. val glow = if (!game.powered) 0f else if (calm) .7f else .55f + .25f * sin(clock / 400.0).toFloat() @@ -521,7 +524,8 @@ internal fun OrbManScreen(best: Int, onBest: (Int) -> Unit, onLeave: () -> Unit) Modifier.background(Navy.copy(alpha = .8f), RoundedCornerShape(6.dp)).padding(horizontal = 16.dp, vertical = 6.dp), color = Honey, fontFamily = Marquee, fontSize = 26.sp) if (paused || !game.alive) Column(Modifier.background(Navy, RoundedCornerShape(6.dp)).border(2.dp, Honey, RoundedCornerShape(6.dp)).padding(20.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(8.dp)) { Text(if (game.alive) "PAUSED" else "GAME OVER", color = Honey, fontFamily = Marquee, fontSize = 30.sp) - if (!game.alive) Text(if (game.score > best) "New best: ${game.score}" else "Score: ${game.score} · level ${game.level}", color = Color.White, fontSize = 16.sp) + if (!game.alive && newBest) CastCheer() + if (!game.alive) Text(if (newBest) "New best: ${game.score}" else "Score: ${game.score} · level ${game.level}", color = Color.White, fontSize = 16.sp) OrbitButton(if (game.alive) "Carry on" else "Play again", Modifier.width(200.dp).focusRequester(menuFocus), onClick = { if (!game.alive) game = OrbGame.start() paused = false diff --git a/android/app/src/main/java/tv/orbit/classic/ArcadePairs.kt b/android/app/src/main/java/tv/orbit/classic/ArcadePairs.kt index 3e2d459d..99f7f0a0 100644 --- a/android/app/src/main/java/tv/orbit/classic/ArcadePairs.kt +++ b/android/app/src/main/java/tv/orbit/classic/ArcadePairs.kt @@ -129,6 +129,7 @@ internal fun PairsScreen(best: Int, onBest: (Int) -> Unit, onLeave: () -> Unit) } if (game.done) Column(Modifier.background(Navy, RoundedCornerShape(6.dp)).border(2.dp, Honey, RoundedCornerShape(6.dp)).padding(20.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(8.dp)) { Text("ALL PAIRED", color = Honey, fontFamily = Marquee, fontSize = 30.sp) + if (newBest) CastCheer() Text(if (newBest) "New best: ${game.moves} moves" else "${game.moves} moves", color = Color.White, fontSize = 16.sp) OrbitButton("Play again", Modifier.width(200.dp).focusRequester(menuFocus), onClick = { game = PairsGame.deal(random) }) OrbitButton("Leave the game", Modifier.width(200.dp), onClick = onLeave) diff --git a/android/app/src/main/java/tv/orbit/classic/CastBumpers.kt b/android/app/src/main/java/tv/orbit/classic/CastBumpers.kt new file mode 100644 index 00000000..09388b74 --- /dev/null +++ b/android/app/src/main/java/tv/orbit/classic/CastBumpers.kt @@ -0,0 +1,141 @@ +package tv.orbit.classic + +import androidx.compose.foundation.Canvas +import androidx.compose.foundation.layout.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.geometry.Size +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Path +import androidx.compose.ui.graphics.drawscope.Stroke +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.text.SpanStyle +import androidx.compose.ui.text.buildAnnotatedString +import androidx.compose.ui.text.withStyle +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.tv.material3.Text +import kotlin.math.PI +import kotlin.math.abs +import kotlin.math.sin + +/** + * Tots bumpers with the cast (Paul, 5 November 2026: "Tots bumpers and idents, big world-building value"). Every third Tots + * changeover, by the next programme's start so the guide and player agree, a short drawn bumper plays in place of the filmed + * ident, the same length: Ollie bouncing in over the hills by day (with Zip zooming past), Luna rising in the evening sky as + * it winds down. Drawn to the cast's model sheet. With Reduce motion on, each is a still picture. + */ +internal fun totsBumper(nextStartMs: Long) = (nextStartMs / 60_000) % 3 == 0L + +private val TotsLetters = listOf(Color(0xFFFF6B5E), Color(0xFFF7A928), Color(0xFF45B8F5), Color(0xFF5CC24A)) + +private fun ease(x: Float) = (1 - (1 - x.coerceIn(0f, 1f)) * (1 - x.coerceIn(0f, 1f))) + +@Composable +internal fun TotsBumper(mood: TotsMood, modifier: Modifier = Modifier) { + val calm = LocalContext.current.let { context -> remember { OrbitSettings(context).reduceMotion } } + var t by remember { mutableLongStateOf(if (calm) 4_000L else 0L) } + LaunchedEffect(calm) { + if (calm) return@LaunchedEffect + val start = withFrameMillis { it } + while (true) withFrameMillis { t = it - start } + } + Box(modifier.fillMaxSize()) { + if (mood.evening) { + Canvas(Modifier.fillMaxSize()) { + drawRect(Brush.verticalGradient(listOf(Color(0xFF0B1238), Color(0xFF2A1E5C), Color(0xFF4A3A7A)))) + val stars = java.util.Random(23) + repeat(60) { k -> + val twinkle = if (calm) .6f else .4f + .35f * sin(t / 700.0 + k).toFloat() + drawCircle(Color.White.copy(alpha = twinkle), 1.2f + stars.nextFloat() * 1.8f, Offset(stars.nextFloat() * size.width, stars.nextFloat() * size.height * .8f)) + } + // Soft hills in the dark. + drawOval(Color(0xFF1E3A4A), Offset(-size.width * .2f, size.height * .78f), Size(size.width * .8f, size.height * .5f)) + drawOval(Color(0xFF173040), Offset(size.width * .35f, size.height * .82f), Size(size.width * .9f, size.height * .5f)) + // Luna rises and settles, glowing. + val r = size.minDimension * .13f + val rise = ease(t / 2_200f) + val luna = Offset(size.width * .5f, size.height * (.78f - .38f * rise) + if (calm) 0f else sin(t / 900.0).toFloat() * r * .05f) + drawCircle(OrbCharacter.Luna.colour.copy(alpha = .18f), r * 1.8f, luna) + drawOrbChaser(luna, r, OrbCharacter.Luna, OrbDir.Down, false, false, false, 0f) + for (k in 0..2) { + val drift = if (calm) .3f else ((t / 1_500f + k / 3f) % 1f) + val at = luna + Offset(r * (1.1f + k * .45f + drift * .3f), -r * (.6f + k * .45f + drift * .6f)) + val z = r * (.18f + k * .06f) + val p = Path().apply { moveTo(at.x, at.y); lineTo(at.x + z, at.y); lineTo(at.x, at.y + z); lineTo(at.x + z, at.y + z) } + drawPath(p, Color.White.copy(alpha = (.9f * (1f - drift * .7f)) * rise), style = Stroke(z * .18f)) + } + } + TotsTitle(if (mood == TotsMood.WindDown) "Nearly bedtime" else "Sleepy time", ease((t - 1_200) / 800f), Modifier.align(Alignment.BottomCenter).padding(bottom = 104.dp), soft = true) + } else { + Canvas(Modifier.fillMaxSize()) { + drawRect(Brush.verticalGradient(listOf(Color(0xFF6CC0F2), Color(0xFFBFE6FF)))) + // Sun rays turning slowly behind. + val sun = Offset(size.width * .5f, size.height * .42f) + for (k in 0 until 12) { + val a = 2 * PI * k / 12 + if (calm) 0.0 else t / 9_000.0 + val ray = Path().apply { + moveTo(sun.x, sun.y) + lineTo(sun.x + (size.width * kotlin.math.cos(a)).toFloat(), sun.y + (size.width * sin(a)).toFloat()) + lineTo(sun.x + (size.width * kotlin.math.cos(a + .14)).toFloat(), sun.y + (size.width * sin(a + .14)).toFloat()) + close() + } + drawPath(ray, Color.White.copy(alpha = .1f)) + } + drawOval(Color(0xFF7ED957), Offset(-size.width * .2f, size.height * .74f), Size(size.width * .9f, size.height * .6f)) + drawOval(Color(0xFF5CC24A), Offset(size.width * .3f, size.height * .8f), Size(size.width, size.height * .6f)) + // Ollie bounces in from the left and lands on the hill. + val r = size.minDimension * .12f + val travel = ease(t / 1_600f) + val hop = if (calm) 0f else abs(sin(t / 1_600.0 * PI * 3)).toFloat() * (1f - travel) * size.height * .18f + val ollie = Offset(size.width * (-.1f + .6f * travel), size.height * .52f - hop) + drawOrbMascot(ollie, r, OrbDir.Right, if (calm) 0f else (.5f + .5f * sin(t / 180.0).toFloat()) * (1f - travel)) + // Zip zooms across the sky, trailing sparkles. + val zip = ((t - 2_200) / 1_300f) + if (!calm && zip in 0f..1f) { + val at = Offset(size.width * (1.1f - 1.3f * zip), size.height * (.18f + .06f * sin(zip * PI).toFloat())) + for (k in 1..5) drawCircle(Color(0xFFFFE066).copy(alpha = .8f - k * .14f), r * .12f, at + Offset(k * r * .45f, -k * r * .05f)) + drawOrbChaser(at, r * .55f, OrbCharacter.Zip, OrbDir.Left, false, false, false, 0f) + } + } + TotsTitle(null, ease((t - 900) / 700f), Modifier.align(Alignment.BottomCenter).padding(bottom = 104.dp), soft = false) + } + } +} + +/** "ORBIT TOTS" in the channel's colours, with a line under it in the evening. */ +@Composable +private fun TotsTitle(line: String?, shown: Float, modifier: Modifier, soft: Boolean) { + if (shown <= 0f) return + Column(modifier, horizontalAlignment = Alignment.CenterHorizontally) { + Text("ORBIT", color = (if (soft) Color(0xFFD5DCEA) else Navy).copy(alpha = shown), fontSize = 16.sp, letterSpacing = 6.sp) + Text(buildAnnotatedString { + "TOTS".forEachIndexed { i, c -> withStyle(SpanStyle(color = TotsLetters[i].copy(alpha = shown * if (soft) .85f else 1f))) { append(c) } } + }, fontFamily = Anton, fontSize = 54.sp) + if (line != null) Text(line, color = Color(0xFFD5DCEA).copy(alpha = shown), fontSize = 18.sp) + } +} + +/** Zip and Blaze cheer a new best score (Paul: "Zip and Blaze = arcade, playful, action moments"). Still with Reduce motion on. */ +@Composable +internal fun CastCheer(modifier: Modifier = Modifier) { + val calm = LocalContext.current.let { context -> remember { OrbitSettings(context).reduceMotion } } + var t by remember { mutableLongStateOf(0L) } + LaunchedEffect(calm) { if (!calm) { val start = withFrameMillis { it }; while (true) withFrameMillis { t = it - start } } } + Canvas(modifier.size(150.dp, 60.dp)) { + val r = size.height * .32f + val hopA = if (calm) 0f else abs(sin(t / 260.0)).toFloat() * r * .5f + val hopB = if (calm) 0f else abs(sin(t / 260.0 + 1.3)).toFloat() * r * .5f + drawOrbChaser(Offset(size.width * .28f, size.height * .62f - hopA), r, OrbCharacter.Zip, OrbDir.Right, false, false, false, 0f) + drawOrbChaser(Offset(size.width * .72f, size.height * .62f - hopB), r, OrbCharacter.Blaze, OrbDir.Left, false, false, false, t / 140f) + // A few sparkles between them. + for (k in 0..4) { + val a = k * 1.3 + t / 400.0 + drawCircle(Color(0xFFFFE066).copy(alpha = if (calm) .8f else .5f + .4f * sin(a * 2).toFloat()), r * .1f, + Offset(size.width * (.5f + .12f * kotlin.math.cos(a).toFloat()), size.height * (.3f + .18f * sin(a).toFloat()))) + } + } +} diff --git a/android/app/src/main/java/tv/orbit/classic/EmbyClient.kt b/android/app/src/main/java/tv/orbit/classic/EmbyClient.kt index 4daeea42..4d0937f1 100644 --- a/android/app/src/main/java/tv/orbit/classic/EmbyClient.kt +++ b/android/app/src/main/java/tv/orbit/classic/EmbyClient.kt @@ -66,7 +66,7 @@ internal class HttpsEmbyTransport(internal val deviceId: String = UUID.randomUUI connection.connectTimeout = 10_000 connection.readTimeout = request.readTimeoutMs ?: if (request.path == "/Sessions/Logout") 5_000 else 15_000 connection.setRequestProperty("Accept", "application/json") - connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.108.28\"") + connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.108.29\"") request.token?.let { connection.setRequestProperty("X-Emby-Token", it) } if (request.method == "POST") { val bytes = request.body.orEmpty().toByteArray(Charsets.UTF_8) diff --git a/android/app/src/main/java/tv/orbit/classic/Idents.kt b/android/app/src/main/java/tv/orbit/classic/Idents.kt index 97c55f9d..13333cbb 100644 --- a/android/app/src/main/java/tv/orbit/classic/Idents.kt +++ b/android/app/src/main/java/tv/orbit/classic/Idents.kt @@ -104,6 +104,8 @@ internal fun IdentOverlay(session: EmbySampleSession, channel: SampleChannel, ne val video = block?.video ?: identVideo(channel.number, next.startMs) // With idents off, Tots still says goodbye with a picture that doesn't move. if (mood != null && !settings.idents) Image(painterResource(mood.still), null, Modifier.fillMaxSize()) + // Every third Tots changeover, a drawn bumper with the cast instead of the filmed ident. + else if (mood != null && !early && block == null && totsBumper(next.startMs)) TotsBumper(mood) else if (video != null && !(early && !settings.idents)) { val player = remember(video) { ExoPlayer.Builder(context).build().apply { diff --git a/android/app/src/main/java/tv/orbit/classic/OrbitArcade.kt b/android/app/src/main/java/tv/orbit/classic/OrbitArcade.kt index 2c36c54e..7bb98513 100644 --- a/android/app/src/main/java/tv/orbit/classic/OrbitArcade.kt +++ b/android/app/src/main/java/tv/orbit/classic/OrbitArcade.kt @@ -216,6 +216,9 @@ private fun SnakeScreen(best: Int, onBest: (Int) -> Unit, onLeave: () -> Unit) { LaunchedEffect(playing) { if (playing) music?.start() else if (music?.isPlaying == true) music.pause() } val menuFocus = remember { FocusRequester() } LaunchedEffect(paused, game.alive) { if (paused || !game.alive) menuFocus.requestFocus() else focus.requestFocus() } + // The best as it stood while this game was played, so the new best still shows once it's been saved; Zip and Blaze cheer it. + val bestBefore = remember(game.alive) { best } + val newBest = game.score > bestBefore && game.score > 0 BackHandler { if (game.alive) paused = !paused else onLeave() } Row(Modifier.fillMaxSize().background(Navy).padding(20.dp).focusRequester(focus).focusable().onPreviewKeyEvent { event -> val native = event.nativeKeyEvent @@ -246,7 +249,8 @@ private fun SnakeScreen(best: Int, onBest: (Int) -> Unit, onLeave: () -> Unit) { SnakeField(game, Modifier.fillMaxSize().padding(6.dp), before, progress) if (paused || !game.alive) Column(Modifier.background(Navy, RoundedCornerShape(6.dp)).border(2.dp, Honey, RoundedCornerShape(6.dp)).padding(20.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(8.dp)) { Text(if (game.alive) "PAUSED" else "GAME OVER", color = Honey, fontFamily = Marquee, fontSize = 30.sp) - if (!game.alive) Text(if (game.score > best) "New best: ${game.score}" else "Score: ${game.score}", color = Color.White, fontSize = 16.sp) + if (!game.alive && newBest) CastCheer() + if (!game.alive) Text(if (newBest) "New best: ${game.score}" else "Score: ${game.score}", color = Color.White, fontSize = 16.sp) OrbitButton(if (game.alive) "Carry on" else "Play again", Modifier.width(200.dp).focusRequester(menuFocus), onClick = { if (!game.alive) { game = SnakeGame.start(30, 22, random); before = null; progress = 1f } paused = false diff --git a/android/app/src/main/java/tv/orbit/classic/SecureMediaDataSource.kt b/android/app/src/main/java/tv/orbit/classic/SecureMediaDataSource.kt index 1e652e60..76e19f26 100644 --- a/android/app/src/main/java/tv/orbit/classic/SecureMediaDataSource.kt +++ b/android/app/src/main/java/tv/orbit/classic/SecureMediaDataSource.kt @@ -33,7 +33,7 @@ internal class SecureMediaDataSource(private val session: EmbySampleSession) : B next.instanceFollowRedirects = false next.connectTimeout = 10_000 next.readTimeout = 20_000 - next.setRequestProperty("User-Agent", "OrbitTV/0.108.28") + next.setRequestProperty("User-Agent", "OrbitTV/0.108.29") next.setRequestProperty("Accept-Encoding", "identity") session.mediaHeaders(address).forEach { (key, value) -> next.setRequestProperty(key, value) } if (dataSpec.position != 0L || dataSpec.length != C.LENGTH_UNSET.toLong()) {