Skip to main content

Media components

Media is a primary AAOS application domain: browse, now-playing, transport controls, and queue management under driving restrictions.

Purpose​

  • Deliver glanceable now-playing and large transport controls.
  • Provide restriction-aware browse/search substitutes.
  • Keep parity for Compose media apps and View-based OEM skins.

Component set​

ComponentRoleSafety classStatus
MediaNowPlayingTitle, artist, art, progress, transport, sourceConvenienceAlpha Views · Experimental Compose — spec
MediaTransportPlay/pause, next, previousConvenienceIncluded in MediaNowPlaying
MediaBrowseListHierarchy browseConvenience (restricted)Planned
MediaQueueUpcoming tracksConvenience (restricted)Planned
MediaMiniPlayerChrome / system bar peekConveniencePlanned
MediaErrorBannerSource errorsInformational / warningPlanned

States​

  • Playing / paused / buffering / error / no source
  • Connecting to Bluetooth / projection (program-specific)
  • Driving-restricted browse (limited depth, no keyboard search)
  • Artwork unavailable (tokenized placeholder — never blank chaotic layout)

Compliance​

ConcernRule
DrivingTransport via MediaTransport (Allow). Source / scrub via MediaComplex (Block while Moving). Prefer transport + now-playing; limit browse complexity (restriction-states)
UXTransport buttons ≥ touch minimum (ux)
GlanceTitle one line; secondary artist recessed (a11y)
MotionProgress updates without layout thrash; reduce decorative viz while driving
HonestyPosition / duration only from live Signal.Value — no fake telemetry

Token dependencies​

  • cabin.component.mediaNowPlaying.*
  • cabin.color.semantic.mediaAccent
  • Type roles title, body, label

Compose API (Experimental — MediaNowPlaying)​

@Composable
fun CabinMediaNowPlaying(
state: CabinMediaNowPlayingState,
onAction: (CabinMediaNowPlayingAction) -> Unit,
modifier: Modifier = Modifier,
)

Views API (Alpha — MediaNowPlaying)​

class CabinMediaNowPlayingView : /* … */ {
fun bind(state: CabinMediaNowPlayingState)
fun setOnActionListener(listener: ((CabinMediaNowPlayingAction) -> Unit)?)
fun setCompliance(host: CabinComplianceHost?)
}

Planned (later)​

// Planned
@Composable
fun MediaTransport(
isPlaying: Boolean,
onPlayPause: () -> Unit,
onNext: () -> Unit,
onPrevious: () -> Unit,
modifier: Modifier = Modifier,
)

Parity notes​

CabinMediaNowPlayingState and CabinMediaNowPlayingAction are identical contracts on Compose and Views. Shared fixtures must emit the same actions.

Acceptance criteria​

  • Transport usable while driving
  • Complex source gated while Moving (fail-closed missing host)
  • Error/no-source / unavailable progress specified — no invented numbers
  • Artwork fallback stable
  • Compose/Views parity for transport + now-playing
  • Browse driving substitute (later)