Rebrand, part two: block idents, Drive-In intro and the credits squeeze in the new identity (build 58)
Paul, 17 November 2026: one push for the whole rebrand. Every block and event ident is re-made in the Sunset Stripes style (the kit's ident with the block's name, rendered by the kit's block-render.js); each Ring X night now has its own clip with its name and rope colour in it, instead of a name drawn over a shared one. The Drive-In intro is the kit's Drive-In ident with the curtains' sound. The credits squeeze takes on the channel's own colours: its background and glow behind a framed picture, the channel's logo, a large next-up with a countdown ring, what's ending under the picture, and later on the channel along a translucent strip finished with the stripe rule. ChannelPalette.kt carries each channel's kit colours. The Settings redesign is left out, as Paul asked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@ plugins {
|
||||
id("org.jetbrains.kotlin.plugin.compose")
|
||||
}
|
||||
/** The release's build number: versionCode is this x 10 plus the edition's channel. */
|
||||
val ORBIT_BUILD = 57
|
||||
val ORBIT_BUILD = 58
|
||||
android {
|
||||
namespace = "tv.orbit.classic"
|
||||
compileSdk = 36
|
||||
|
||||
@@ -57,7 +57,15 @@ internal val BlockIdents: Map<String, BlockIdent> = mapOf(
|
||||
"saturday.heroes" to BlockIdent(R.raw.block_saturday_heroes, R.raw.block_saturday_mornings_sting),
|
||||
"saturday.orbitx" to BlockIdent(R.raw.block_saturday_orbitx, R.raw.block_saturday_mornings_sting),
|
||||
"saturday.rewind" to BlockIdent(R.raw.block_saturday_rewind, R.raw.block_saturday_mornings_sting),
|
||||
) + RingXNights.keys.associateWith { BlockIdent(R.raw.block_ringx_nights, R.raw.block_ringx_nights_sting, BlockOverlay.RingXNight) }
|
||||
// The new identity (17 November 2026): each Ring X night has its own clip with its name and rope colour in it, so
|
||||
// nothing is drawn over a shared one any more.
|
||||
"ringx.monday" to BlockIdent(R.raw.block_ringx_monday, R.raw.block_ringx_nights_sting),
|
||||
"ringx.tuesday" to BlockIdent(R.raw.block_ringx_tuesday, R.raw.block_ringx_nights_sting),
|
||||
"ringx.wednesday" to BlockIdent(R.raw.block_ringx_wednesday, R.raw.block_ringx_nights_sting),
|
||||
"ringx.thursday" to BlockIdent(R.raw.block_ringx_thursday, R.raw.block_ringx_nights_sting),
|
||||
"ringx.friday" to BlockIdent(R.raw.block_ringx_friday, R.raw.block_ringx_nights_sting),
|
||||
"ringx.saturday" to BlockIdent(R.raw.block_ringx_saturday, R.raw.block_ringx_nights_sting),
|
||||
)
|
||||
|
||||
/** Each channel's Sunday Mornings, for its Saturday Mornings key on a Sunday. */
|
||||
private val SundayMornings = mapOf(
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package tv.orbit.classic
|
||||
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
/**
|
||||
* Each channel's Sunset Stripes colours, from the brand kit's source/channels.json (Paul approved the kit on 17 November
|
||||
* 2026): the planet's top, its five stripes, the ring, the background and the glow. Used where a screen takes on the
|
||||
* channel's look, such as the credits squeeze. Generated by tools/import-brand-kit.py; keep the two in step.
|
||||
*/
|
||||
internal class ChannelPalette(top: Long, stripes: LongArray, ring: Long, background: Long, glow: Long) {
|
||||
val top = Color(top)
|
||||
val stripes = stripes.map { Color(it) }
|
||||
val ring = Color(ring)
|
||||
val background = Color(background)
|
||||
val glow = Color(glow)
|
||||
}
|
||||
|
||||
private val Palettes: Map<Int, ChannelPalette> = mapOf(
|
||||
101 to ChannelPalette(0xFF8FDCFF, longArrayOf(0xFF3D9BE0, 0xFF3D9BE0, 0xFF2C74C4, 0xFF1F56A3, 0xFF8FDCFF), 0xFFFFFFFF, 0xFF050D1F, 0xFF3D9BE0),
|
||||
102 to ChannelPalette(0xFFCDBCFF, longArrayOf(0xFF8F72FF, 0xFF8F72FF, 0xFF6C50E6, 0xFF4D35BD, 0xFFCDBCFF), 0xFFFFFFFF, 0xFF0A0820, 0xFF8F72FF),
|
||||
103 to ChannelPalette(0xFFFFA6DC, longArrayOf(0xFFFF4FA3, 0xFFFF4FA3, 0xFFE0338A, 0xFFB8266F, 0xFF7FE3FF), 0xFFFFFFFF, 0xFF160719, 0xFFFF4FA3),
|
||||
104 to ChannelPalette(0xFFFFD970, longArrayOf(0xFFF5A524, 0xFFF5A524, 0xFFC9761A, 0xFFC9761A, 0xFF9E5512), 0xFFFFF4D6, 0xFF140D04, 0xFFF5A524),
|
||||
105 to ChannelPalette(0xFFD8FF3D, longArrayOf(0xFFFF3DA8, 0xFFFF3DA8, 0xFF8F3DFF, 0xFF5A22C9, 0xFFD8FF3D), 0xFFFFFFFF, 0xFF0C0614, 0xFFFF3DA8),
|
||||
106 to ChannelPalette(0xFFFF8AF2, longArrayOf(0xFFC43CFF, 0xFFC43CFF, 0xFF8A2FE0, 0xFF5A20B0, 0xFFFF8AF2), 0xFFFFFFFF, 0xFF09030F, 0xFFC43CFF),
|
||||
107 to ChannelPalette(0xFFF2D49A, longArrayOf(0xFFD9A441, 0xFFD9A441, 0xFFC0392B, 0xFF8E2A20, 0xFF5FD6E8), 0xFFFFF7E8, 0xFF0F0A06, 0xFFD9A441),
|
||||
108 to ChannelPalette(0xFF7FF0B4, longArrayOf(0xFFFFCF3D, 0xFFFFCF3D, 0xFFFF7A3D, 0xFFFF4F7A, 0xFF7FF0B4), 0xFFFFFFFF, 0xFF071A17, 0xFF2FD18A),
|
||||
109 to ChannelPalette(0xFFEFE2C4, longArrayOf(0xFFC9A96A, 0xFFC9A96A, 0xFF9C7D45, 0xFF6F5630, 0xFFEFE2C4), 0xFFFFFFFF, 0xFF0A0908, 0xFFC9A96A),
|
||||
110 to ChannelPalette(0xFFFFE066, longArrayOf(0xFFFF5C8A, 0xFFFF5C8A, 0xFFFF3D5F, 0xFFD6204A, 0xFFFFE066), 0xFFFFFFFF, 0xFF16060D, 0xFFFF3D5F),
|
||||
201 to ChannelPalette(0xFFC4EBA0, longArrayOf(0xFF4FA36B, 0xFF4FA36B, 0xFF2B8A72, 0xFF1F6F6A, 0xFFC4EBA0), 0xFFF4F9EC, 0xFF06170F, 0xFF4FA36B),
|
||||
202 to ChannelPalette(0xFF9FD8FF, longArrayOf(0xFF3F8FD6, 0xFF3F8FD6, 0xFF2F6FA8, 0xFF3D9A6A, 0xFFF2C55C), 0xFFFFF6DC, 0xFF03070F, 0xFF3F8FD6),
|
||||
203 to ChannelPalette(0xFFFFD98A, longArrayOf(0xFFE08A2C, 0xFFE08A2C, 0xFF9A6A2A, 0xFF4F7A3A, 0xFF2F5A2A), 0xFFFFFFFF, 0xFF0D0A04, 0xFFE08A2C),
|
||||
204 to ChannelPalette(0xFFE8EEF2, longArrayOf(0xFFE2343F, 0xFFE2343F, 0xFFA51F2A, 0xFF6E1219, 0xFF5FD6E8), 0xFFE8EEF2, 0xFF050608, 0xFFA51F2A),
|
||||
205 to ChannelPalette(0xFFFFD27A, longArrayOf(0xFFF39A2C, 0xFFF39A2C, 0xFFD9662A, 0xFFA8452A, 0xFFFFE9B8), 0xFFFFF8EA, 0xFF150B05, 0xFFF39A2C),
|
||||
206 to ChannelPalette(0xFFFFE1A6, longArrayOf(0xFFD4A24C, 0xFFD4A24C, 0xFFA97A3A, 0xFF6F8A8F, 0xFF3F5F6E), 0xFFFFFAF0, 0xFF0B0D10, 0xFFD4A24C),
|
||||
300 to ChannelPalette(0xFFFFE066, longArrayOf(0xFFFF5A4F, 0xFFFF5A4F, 0xFF2FD1C4, 0xFF2FD1C4, 0xFFFFE066), 0xFFFFFFFF, 0xFF0B0718, 0xFFFF5A4F),
|
||||
301 to ChannelPalette(0xFFFFE08A, longArrayOf(0xFFF2B53C, 0xFFF2B53C, 0xFFD43A3A, 0xFFA32030, 0xFFFFE08A), 0xFFFFFFFF, 0xFF0D0607, 0xFFD43A3A),
|
||||
302 to ChannelPalette(0xFFFFC15E, longArrayOf(0xFFFF7A2E, 0xFFFF7A2E, 0xFFE8461F, 0xFFB52A14, 0xFFFFC15E), 0xFFFFFFFF, 0xFF120603, 0xFFFF7A2E),
|
||||
303 to ChannelPalette(0xFF8FF5FF, longArrayOf(0xFF2FC4D9, 0xFF2FC4D9, 0xFF1F8FB0, 0xFF18638A, 0xFF8FF5FF), 0xFFFFFFFF, 0xFF020B10, 0xFF2FC4D9),
|
||||
304 to ChannelPalette(0xFFFF4A4A, longArrayOf(0xFFC41A2C, 0xFFA3122A, 0xFF7A0C1D, 0xFF4A0712, 0xFF4A0712), 0xFFEFE3DC, 0xFF0D0204, 0xFFA3122A),
|
||||
305 to ChannelPalette(0xFFC9A6FF, longArrayOf(0xFF7A3DFF, 0xFF7A3DFF, 0xFF4F22B8, 0xFF2D1470, 0xFF3DFFB0), 0xFFFFFFFF, 0xFF07040F, 0xFF7A3DFF),
|
||||
306 to ChannelPalette(0xFFFFE14D, longArrayOf(0xFFFF4F4F, 0xFFFF9F3D, 0xFFFFE14D, 0xFF3DD6A0, 0xFF3D8FFF), 0xFFFFFFFF, 0xFF071632, 0xFF3D8FFF),
|
||||
307 to ChannelPalette(0xFFFFC2D6, longArrayOf(0xFFFF7AA8, 0xFFFF7AA8, 0xFFD95C9C, 0xFF9A4A9E, 0xFFFFD9A8), 0xFFFFFFFF, 0xFF160A1C, 0xFFFF7AA8),
|
||||
308 to ChannelPalette(0xFF9FF5E6, longArrayOf(0xFF2FBFA8, 0xFF2FBFA8, 0xFFF2A93C, 0xFFE0663A, 0xFF9FF5E6), 0xFFFFFFFF, 0xFF04100E, 0xFF2FBFA8),
|
||||
309 to ChannelPalette(0xFFFFFFFF, longArrayOf(0xFFD9343F, 0xFFD9343F, 0xFFF6F2E4, 0xFF2A4FA8, 0xFF1D3577), 0xFFFFFFFF, 0xFF050814, 0xFFD9343F),
|
||||
310 to ChannelPalette(0xFFFFFFFF, longArrayOf(0xFFE0323C, 0xFFE0323C, 0xFF2F9A5A, 0xFF1F6E40, 0xFFF6D04D), 0xFFF6D04D, 0xFF06120C, 0xFFE0323C),
|
||||
401 to ChannelPalette(0xFFE6EBF2, longArrayOf(0xFFFF2E3D, 0xFFFF2E3D, 0xFFC41522, 0xFF8A0D17, 0xFFE6EBF2), 0xFFFFFFFF, 0xFF0B0B0F, 0xFFFF2E3D),
|
||||
601 to ChannelPalette(0xFF5EF3FF, longArrayOf(0xFF3A6BFF, 0xFF3A6BFF, 0xFF7B4DFF, 0xFFB23CFF, 0xFFB23CFF), 0xFFFFFFFF, 0xFF0A0A2A, 0xFF3A6BFF),
|
||||
602 to ChannelPalette(0xFFF6F2E4, longArrayOf(0xFF3D6FD9, 0xFF3D6FD9, 0xFF2A4FA8, 0xFFD9343F, 0xFFF6D04D), 0xFFFFFFFF, 0xFF050A1A, 0xFF3D6FD9),
|
||||
603 to ChannelPalette(0xFFD8FF3D, longArrayOf(0xFF7DFF3D, 0xFF7DFF3D, 0xFF2FC46B, 0xFF1F7A4F, 0xFFD8FF3D), 0xFFFFFFFF, 0xFF040A06, 0xFF7DFF3D),
|
||||
604 to ChannelPalette(0xFF4FF0FF, longArrayOf(0xFFB45CFF, 0xFFB45CFF, 0xFFFF4FA3, 0xFFFF4FA3, 0xFF4FF0FF), 0xFFFFFFFF, 0xFF110726, 0xFFFF4FA3),
|
||||
605 to ChannelPalette(0xFFFFE14D, longArrayOf(0xFFFF4FD8, 0xFFFF4FD8, 0xFF4FC3FF, 0xFF4FC3FF, 0xFFFFE14D), 0xFFFFFFFF, 0xFF141A2E, 0xFFFF4FD8),
|
||||
611 to ChannelPalette(0xFF9EF0FF, longArrayOf(0xFFFFB13D, 0xFFFFB13D, 0xFF7AD35A, 0xFF3FB0E0, 0xFF9EF0FF), 0xFFFFFFFF, 0xFF0B1A33, 0xFF3FB0E0),
|
||||
612 to ChannelPalette(0xFFF4F0FF, longArrayOf(0xFFF6D04D, 0xFFF6D04D, 0xFF8F8CFF, 0xFF5A56C9, 0xFFF4F0FF), 0xFFF6D04D, 0xFF070A1F, 0xFF5A56C9),
|
||||
613 to ChannelPalette(0xFF7DFF8A, longArrayOf(0xFF2FD16B, 0xFF2FD16B, 0xFF4F7DFF, 0xFFFF4FD8, 0xFFFFE14D), 0xFFFFFFFF, 0xFF06060F, 0xFF4F7DFF),
|
||||
614 to ChannelPalette(0xFFFFD970, longArrayOf(0xFFFFAB70, 0xFFFFAB70, 0xFFF7A1C4, 0xFFF7A1C4, 0xFFFFD970), 0xFFFFFFFF, 0xFF1D1430, 0xFFF7A1C4),
|
||||
)
|
||||
|
||||
private val PackPalettes: Map<String, ChannelPalette> = mapOf(
|
||||
"orbit-mistletoe" to ChannelPalette(0xFFFFF1F1, longArrayOf(0xFFE8576B, 0xFFE8576B, 0xFF4FA36B, 0xFF2F7A4F, 0xFFF6D04D), 0xFFF6D04D, 0xFF140A0D, 0xFFE8576B),
|
||||
"orbit-sakura" to ChannelPalette(0xFFFFE3EC, longArrayOf(0xFFFFA8C5, 0xFFFFA8C5, 0xFFF07AA6, 0xFFC2507F, 0xFFFFE3EC), 0xFFFFFFFF, 0xFF140B14, 0xFFF07AA6),
|
||||
)
|
||||
|
||||
/** Orbit 1's colours stand in for a channel without its own. */
|
||||
internal fun channelPalette(number: Int): ChannelPalette =
|
||||
Palettes[number] ?: CustomChannels.of(number)?.brand?.let { PackPalettes[it] } ?: Palettes.getValue(101)
|
||||
@@ -455,8 +455,10 @@ internal fun EmbyPlaybackDialog(session: EmbySampleSession, plan: EmbyPlaybackPl
|
||||
} }
|
||||
if (window != null) SideEffect { window.onBack = dismiss }
|
||||
val content: @Composable () -> Unit = {
|
||||
Box(Modifier.fillMaxSize().background(if (squeeze > 0f) Navy else Color.Black)) {
|
||||
val framed = if (squeeze <= 0f) Modifier.fillMaxSize() else Modifier.padding(start = (36 * squeeze).dp, top = (60 * squeeze).dp)
|
||||
// Squeezed, the screen takes on the channel's colours (the brand kit's redesign, 17 November 2026).
|
||||
val squeezeBack = scheduled?.channel?.number?.let { channelPalette(it).background } ?: Navy
|
||||
Box(Modifier.fillMaxSize().background(if (squeeze > 0f) squeezeBack else Color.Black).then(if (squeeze > 0f) Modifier.background(squeezeBackdrop(scheduled?.channel?.number)) else Modifier)) {
|
||||
val framed = if (squeeze <= 0f) Modifier.fillMaxSize() else Modifier.padding(start = (SQUEEZE_LEFT_DP * squeeze).dp, top = (SQUEEZE_TOP_DP * squeeze).dp)
|
||||
.fillMaxWidth(1f - SQUEEZE_SHRINK * squeeze).fillMaxHeight(1f - SQUEEZE_SHRINK * squeeze)
|
||||
// Subtitles lift clear of the programme bar while it's up, and settle back to the foot of the picture after.
|
||||
val subtitlesLifted = (infoVisible || trackMenu != null) && ready && squeeze == 0f
|
||||
|
||||
@@ -53,6 +53,25 @@ internal fun squeezeCast(number: Int): OrbCharacter? = if (number == TOTS_NUMBER
|
||||
/** Two programmes of the same series one after the other: Keep watching rather than Next. */
|
||||
internal fun keepWatching(current: SampleBroadcast, next: SampleBroadcast) = seriesKey(guideTitleParts(current.media.item.title).first) == seriesKey(guideTitleParts(next.media.item.title).first)
|
||||
|
||||
/**
|
||||
* Where the picture sits while squeezed, in dp on the 960 x 540 screen: the brand kit's redesign (17 November 2026), a
|
||||
* framed window on the left with the channel's own colours round it.
|
||||
*/
|
||||
internal const val SQUEEZE_LEFT_DP = 48
|
||||
internal const val SQUEEZE_TOP_DP = 118
|
||||
|
||||
/** Behind the squeezed picture: the channel's background, lit by its glow from the lower right and faintly from the top left. */
|
||||
internal fun squeezeBackdrop(number: Int?): androidx.compose.ui.graphics.Brush {
|
||||
val p = channelPalette(number ?: 101)
|
||||
return object : androidx.compose.ui.graphics.ShaderBrush() {
|
||||
override fun createShader(size: androidx.compose.ui.geometry.Size): androidx.compose.ui.graphics.Shader {
|
||||
// One flat colour and two soft glows, drawn as a single radial gradient each: no live blur on the boxes.
|
||||
return androidx.compose.ui.graphics.RadialGradientShader(Offset(size.width * .85f, size.height * 1.1f), size.width * .62f,
|
||||
listOf(p.glow.copy(alpha = .45f), p.background.copy(alpha = 0f)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Everything around the framed picture. The picture itself is the player, drawn smaller underneath. */
|
||||
@Composable
|
||||
internal fun SqueezePanel(session: EmbySampleSession, channel: SampleChannel, current: SampleBroadcast, next: SampleBroadcast, nowMs: Long, shown: Float) {
|
||||
@@ -64,46 +83,78 @@ internal fun SqueezePanel(session: EmbySampleSession, channel: SampleChannel, cu
|
||||
LaunchedEffect(calm) { if (!calm) { val start = withFrameMillis { it }; while (true) withFrameMillis { t = it - start } } }
|
||||
val later = remember(next.startMs) { channel.guide(next.endMs, 3) }
|
||||
val brand = ChannelBrands.forNumber(channel.number)
|
||||
val p = channelPalette(channel.number)
|
||||
val short = (brand?.displayName ?: channel.name).removePrefix("Orbit ")
|
||||
val keep = keepWatching(current, next)
|
||||
val (name, detail) = guideTitleParts(next.media.item.title)
|
||||
val seconds = ((next.startMs - nowMs) / 1000).coerceAtLeast(0)
|
||||
val lengthS = (squeezeLength(current.media.item.type) / 1000).coerceAtLeast(1)
|
||||
val queue = OrbitCompanion.queue
|
||||
val queued = queue.firstOrNull()
|
||||
// Queued from the phone (Paul, 6 November 2026): Up next is the queue's, in Catch Up's green or the accent for a channel
|
||||
// live. It's read as it draws, so cancelling the queue brings the channel's own next straight back.
|
||||
val tint = when { queued == null -> p.top; queued.catchUpStartMs != null -> CatchUpGreen; else -> Yellow }
|
||||
Box(Modifier.fillMaxSize().graphicsLayer { alpha = shown }) {
|
||||
if (brand != null) Image(cachedPainter(brand.logo), brand.displayName, Modifier.padding(start = 36.dp, top = 14.dp).logoPlate().width(120.dp).height(38.dp))
|
||||
// Queued from the phone (Paul, 6 November 2026): Up next is the queue's, in Catch Up's green or the accent for a
|
||||
// channel live. It's read as it draws, so cancelling the queue brings the channel's own next straight back.
|
||||
val queue = OrbitCompanion.queue
|
||||
val queued = queue.firstOrNull()
|
||||
if (queued != null) Column(Modifier.align(Alignment.TopEnd).padding(top = 60.dp, end = 36.dp).width(360.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) {
|
||||
val tint = if (queued.catchUpStartMs != null) CatchUpGreen else Yellow
|
||||
Text("UP NEXT · YOUR QUEUE", color = tint, fontFamily = Anton, fontSize = 22.sp, maxLines = 1)
|
||||
Text(if (seconds >= 60) "in about a minute" else "in $seconds seconds", color = Muted, fontSize = 13.sp)
|
||||
Box(Modifier.fillMaxWidth().height(160.dp).clip(RoundedCornerShape(8.dp)).background(Panel).border(3.dp, tint, RoundedCornerShape(8.dp))) {
|
||||
QueuedArtwork(session, queued.itemId, queued.seriesId, Modifier.fillMaxSize())
|
||||
Text(if (queued.catchUpStartMs != null) "CATCH UP" else "LIVE", Modifier.align(Alignment.TopStart).padding(8.dp).background(tint, RoundedCornerShape(4.dp))
|
||||
.padding(horizontal = 7.dp, vertical = 2.dp), color = OnAccent, fontWeight = FontWeight.Bold, fontSize = 12.sp)
|
||||
}
|
||||
Text(queued.title, color = Ink, fontSize = 18.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
Text(listOfNotNull(queued.sub, "${if (queued.catchUpStartMs != null) "From the start" else "Live"} on ${queued.number} ${queued.channel}").joinToString(" · "),
|
||||
color = Muted, fontSize = 13.sp, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
// A faint top-left glow, over the backdrop the player draws.
|
||||
Canvas(Modifier.fillMaxSize()) {
|
||||
drawRect(androidx.compose.ui.graphics.Brush.radialGradient(listOf(p.glow.copy(alpha = .16f), Color.Transparent), Offset(size.width * .1f, 0f), size.width * .45f))
|
||||
}
|
||||
// Beside the picture: what's next.
|
||||
else Column(Modifier.align(Alignment.TopEnd).padding(top = 60.dp, end = 36.dp).width(360.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) {
|
||||
Text(if (keep) "KEEP WATCHING" else "NEXT ON ${(brand?.displayName ?: channel.name).removePrefix("Orbit ").uppercase()}", color = Yellow, fontFamily = Anton, fontSize = 22.sp, maxLines = 1)
|
||||
Text(if (seconds >= 60) "in about a minute" else "in $seconds seconds", color = Muted, fontSize = 13.sp)
|
||||
Box(Modifier.fillMaxWidth().height(160.dp).clip(RoundedCornerShape(8.dp)).background(Panel)) {
|
||||
ProgrammeArtwork(session, channel, next, Modifier.fillMaxSize())
|
||||
// The channel's logo, top left.
|
||||
if (brand != null) Image(cachedPainter(brand.logo), brand.displayName, Modifier.padding(start = SQUEEZE_LEFT_DP.dp, top = 30.dp).height(56.dp).width(150.dp),
|
||||
alignment = Alignment.CenterStart)
|
||||
// A thin frame round the picture, which the player draws underneath.
|
||||
BoxWithConstraints(Modifier.fillMaxSize()) {
|
||||
val w = maxWidth * (1f - SQUEEZE_SHRINK); val h = maxHeight * (1f - SQUEEZE_SHRINK)
|
||||
Box(Modifier.padding(start = SQUEEZE_LEFT_DP.dp, top = SQUEEZE_TOP_DP.dp).size(w, h).border(1.dp, Color.White.copy(alpha = .12f), RoundedCornerShape(4.dp)))
|
||||
// What's ending, under the picture.
|
||||
Row(Modifier.padding(start = SQUEEZE_LEFT_DP.dp, top = SQUEEZE_TOP_DP.dp + h + 12.dp).width(w), horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text("NOW ENDING", Modifier.border(1.dp, p.ring.copy(alpha = .5f), RoundedCornerShape(3.dp)).padding(horizontal = 5.dp, vertical = 1.dp),
|
||||
color = p.ring, fontSize = 10.sp, fontWeight = FontWeight.Bold, letterSpacing = 1.6.sp)
|
||||
Text(guideTitleParts(current.media.item.title).first, color = Ink.copy(alpha = .75f), fontSize = 14.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
}
|
||||
Text(if (keep) (detail ?: name) else name, color = Ink, fontSize = 18.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
}
|
||||
// Beside the picture: what's next, large, with a countdown.
|
||||
Column(Modifier.align(Alignment.TopEnd).padding(top = 34.dp, end = 45.dp).width(320.dp), verticalArrangement = Arrangement.spacedBy(7.dp)) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
Text(when { queued != null -> "UP NEXT · YOUR QUEUE"; keep -> "KEEP WATCHING"; else -> "NEXT ON ${short.uppercase()}" },
|
||||
color = if (queued != null) tint else p.ring, fontSize = 12.sp, fontWeight = FontWeight.Bold, letterSpacing = 2.9.sp, maxLines = 1)
|
||||
Box(Modifier.weight(1f).height(1.dp).background(androidx.compose.ui.graphics.Brush.horizontalGradient(listOf(p.ring.copy(alpha = .4f), Color.Transparent))))
|
||||
}
|
||||
Box(Modifier.width(280.dp).height(157.dp).clip(RoundedCornerShape(11.dp)).background(p.stripes[3]).border(1.dp, Color.White.copy(alpha = .08f), RoundedCornerShape(11.dp))) {
|
||||
if (queued != null) {
|
||||
QueuedArtwork(session, queued.itemId, queued.seriesId, Modifier.fillMaxSize())
|
||||
Text(if (queued.catchUpStartMs != null) "CATCH UP" else "LIVE", Modifier.align(Alignment.TopStart).padding(8.dp).background(tint, RoundedCornerShape(4.dp))
|
||||
.padding(horizontal = 7.dp, vertical = 2.dp), color = OnAccent, fontWeight = FontWeight.Bold, fontSize = 12.sp)
|
||||
} else ProgrammeArtwork(session, channel, next, Modifier.fillMaxSize())
|
||||
}
|
||||
Text(when { queued != null -> queued.title; keep -> detail ?: name; else -> name }, color = Color.White, fontFamily = Anton, fontSize = if (name.length > 22) 30.sp else 40.sp,
|
||||
maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
Text(when {
|
||||
queued != null -> listOfNotNull(queued.sub, "${if (queued.catchUpStartMs != null) "From the start" else "Live"} on ${queued.number} ${queued.channel}").joinToString(" · ")
|
||||
keep -> "Straight after the credits"
|
||||
detail != null -> detail
|
||||
detail != null -> "$detail · ${next.media.durationMs / 60_000} min"
|
||||
else -> "${next.media.durationMs / 60_000} min"
|
||||
}, color = Muted, fontSize = 13.sp, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
}, color = Ink.copy(alpha = .72f), fontSize = 13.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
Row(Modifier.padding(top = 4.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(11.dp)) {
|
||||
Box(Modifier.size(52.dp), contentAlignment = Alignment.Center) {
|
||||
Canvas(Modifier.fillMaxSize()) {
|
||||
val stroke = androidx.compose.ui.graphics.drawscope.Stroke(width = size.width * .085f, cap = androidx.compose.ui.graphics.StrokeCap.Round)
|
||||
val inset = stroke.width / 2
|
||||
val arcSize = androidx.compose.ui.geometry.Size(size.width - stroke.width, size.height - stroke.width)
|
||||
drawArc(Color.White.copy(alpha = .12f), 0f, 360f, false, Offset(inset, inset), arcSize, style = stroke)
|
||||
drawArc(tint, -90f, 360f * (seconds.toFloat() / lengthS).coerceIn(0f, 1f), false, Offset(inset, inset), arcSize, style = stroke)
|
||||
}
|
||||
Text("$seconds", color = Color.White, fontFamily = Anton, fontSize = 24.sp)
|
||||
}
|
||||
Text(if (seconds >= 60) "Starting in about a minute" else "Starting in $seconds seconds", color = Ink, fontSize = 15.sp, fontWeight = FontWeight.Bold)
|
||||
}
|
||||
}
|
||||
// Underneath: later on the channel, with its cast member.
|
||||
Row(Modifier.align(Alignment.BottomCenter).padding(start = 36.dp, end = 36.dp, bottom = 28.dp).fillMaxWidth().height(110.dp)
|
||||
.background(Panel, RoundedCornerShape(12.dp)).padding(horizontal = 16.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(16.dp)) {
|
||||
if (castOn) Canvas(Modifier.size(80.dp)) {
|
||||
// Underneath: later on the channel, or the rest of the queue, on a translucent strip in the channel's colour.
|
||||
Row(Modifier.align(Alignment.BottomCenter).padding(start = SQUEEZE_LEFT_DP.dp, end = SQUEEZE_LEFT_DP.dp, bottom = 24.dp).fillMaxWidth().height(58.dp)
|
||||
.clip(RoundedCornerShape(13.dp)).background(p.background.copy(alpha = .55f)).background(Color.White.copy(alpha = .06f))
|
||||
.border(1.dp, Color.White.copy(alpha = .08f), RoundedCornerShape(13.dp)).padding(horizontal = 18.dp),
|
||||
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(17.dp)) {
|
||||
if (castOn) Canvas(Modifier.size(44.dp)) {
|
||||
val bob = if (calm) 0f else sin(t / 650.0).toFloat() * size.height * .05f
|
||||
val shut = !calm && (t % 3_400) < 150
|
||||
val who = squeezeCast(channel.number)
|
||||
@@ -111,27 +162,29 @@ internal fun SqueezePanel(session: EmbySampleSession, channel: SampleChannel, cu
|
||||
if (who == null) drawOrbMascot(c, size.minDimension * .26f, blink = shut)
|
||||
else drawOrbChaser(c, size.minDimension * .34f, who, OrbDir.Right, false, false, false, t / 400f, eyesShut = shut)
|
||||
}
|
||||
if (queued != null) Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||
Text(if (queue.size > 1) "THEN FROM YOUR QUEUE" else "FROM YOUR PHONE", color = Muted, fontSize = 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.sp)
|
||||
if (queue.size > 1) Row(horizontalArrangement = Arrangement.spacedBy(28.dp)) {
|
||||
queue.drop(1).take(3).forEachIndexed { i, q ->
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text("${i + 2}", color = if (q.catchUpStartMs != null) CatchUpGreen else Yellow, fontFamily = BarlowCondensed, fontSize = 18.sp)
|
||||
Text(q.title, color = Ink, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.widthIn(max = 200.dp))
|
||||
}
|
||||
}
|
||||
} else Text("Queued on Orbit Companion. Remove it there to stay on ${(brand?.displayName ?: channel.name)}.", color = Ink, fontSize = 15.sp, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
} else Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||
Text("LATER ON ${(brand?.displayName ?: channel.name).removePrefix("Orbit ").uppercase()}", color = Muted, fontSize = 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.sp)
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(28.dp)) {
|
||||
later.forEach { show ->
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically) {
|
||||
Text(clock(show.startMs), color = Yellow, fontFamily = BarlowCondensed, fontSize = 18.sp)
|
||||
Text(guideTitleParts(show.media.item.title).first, color = Ink, fontSize = 15.sp, fontWeight = FontWeight.SemiBold, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.widthIn(max = 200.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
Text(if (queued != null) (if (queue.size > 1) "THEN FROM\nYOUR QUEUE" else "FROM YOUR\nPHONE") else "LATER ON\n${short.uppercase()}",
|
||||
Modifier.width(78.dp), color = p.ring, fontSize = 11.sp, fontWeight = FontWeight.Bold, letterSpacing = 2.6.sp, lineHeight = 14.sp, maxLines = 2)
|
||||
if (queued != null) {
|
||||
if (queue.size > 1) queue.drop(1).take(3).forEachIndexed { i, q ->
|
||||
LaterSlot("${i + 2}", q.title, if (q.catchUpStartMs != null) CatchUpGreen else Yellow)
|
||||
} else Text("Queued on Orbit Companion. Remove it there to stay on ${brand?.displayName ?: channel.name}.", color = Ink, fontSize = 15.sp, maxLines = 1, overflow = TextOverflow.Ellipsis)
|
||||
} else later.forEach { show -> LaterSlot(clock(show.startMs), guideTitleParts(show.media.item.title).first, p.top) }
|
||||
Spacer(Modifier.weight(1f))
|
||||
// The stripe rule from the ident, tying it back to the channel.
|
||||
Column(Modifier.width(90.dp), verticalArrangement = Arrangement.spacedBy(2.5.dp)) {
|
||||
p.stripes.forEachIndexed { i, colour -> Box(Modifier.fillMaxWidth().height(listOf(4, 3, 2.5f, 2, 1.5f)[i].toFloat().dp).background(colour, RoundedCornerShape(1.dp))) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun LaterSlot(time: String, title: String, colour: Color) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
Box(Modifier.width(1.dp).height(36.dp).background(Color.White.copy(alpha = .08f)))
|
||||
Column(Modifier.padding(start = 17.dp)) {
|
||||
Text(time, color = colour, fontFamily = Anton, fontSize = 20.sp, lineHeight = 20.sp)
|
||||
Text(title, color = Color.White, fontSize = 14.sp, fontWeight = FontWeight.Bold, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.widthIn(max = 170.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -103,11 +103,12 @@ class PresentationTest {
|
||||
assertTrue(BlockIdents.keys.none { it.startsWith("drivein.") || it.startsWith("premiere.") || it.startsWith("themed.") })
|
||||
}
|
||||
|
||||
@Test fun ringXNightsShareOneClipAndEachHasItsName() {
|
||||
val nights = BlockIdents.filterValues { it.overlay == BlockOverlay.RingXNight }
|
||||
/** The new identity (17 November 2026): each night is its own clip with its name in it, nothing drawn over it. */
|
||||
@Test fun ringXNightsEachHaveTheirOwnClip() {
|
||||
val nights = BlockIdents.filterKeys { it in RingXNights }
|
||||
assertEquals(6, nights.size)
|
||||
assertEquals(1, nights.values.map { it.video }.toSet().size)
|
||||
nights.keys.forEach { assertNotNull(RingXNights[it]) }
|
||||
assertEquals(6, nights.values.map { it.video }.toSet().size)
|
||||
assertTrue(nights.values.all { it.overlay == BlockOverlay.None })
|
||||
}
|
||||
|
||||
@Test fun thePpvLowerThirdUsesTheBookedTitleAndNothingIfThereIsNone() {
|
||||
|
||||
@@ -88,7 +88,12 @@ def main():
|
||||
ident(os.path.join(KIT, "channels", "orbit-tots", "orbit-tots-ident.mp4"), f"res/raw/ident_{name}.mp4")
|
||||
for slug, name in (("orbit-mistletoe", "mistletoe"), ("orbit-sakura", "sakura")):
|
||||
ident(os.path.join(KIT, "channels", slug, f"{slug}-ident.mp4"), f"res/raw/ident_{name}.mp4")
|
||||
print(f"idents: {len(idents) + 5}")
|
||||
ident(os.path.join(KIT, "channels", "orbit-drive-in", "orbit-drive-in-ident.mp4"), "res/raw/drive_in_intro.mp4")
|
||||
print(f"idents: {len(idents) + 6}, with the Drive-In intro")
|
||||
# Block and event idents: rendered by the kit's source/block-render.js from source/blocks.json, 4 s, silent (each has a sting).
|
||||
blocks = sorted(f for f in os.listdir(need(os.path.join(KIT, "blocks"))) if f.endswith(".mp4"))
|
||||
for f in blocks: run("cp", os.path.join(KIT, "blocks", f), os.path.join(RES, "raw", f))
|
||||
print(f"block idents: {len(blocks)}")
|
||||
|
||||
po = os.path.join(KIT, "planet-o")
|
||||
webp(os.path.join(stage, "wordmark.png"), os.path.join(nodpi, "orbit_logo.webp"))
|
||||
|
||||
Reference in New Issue
Block a user