AudioPlaybackSession
Represents an active playback session.
Seek capability
seekTo is an optional native transport capability. The default implementation returns SeekResult.Unsupported. Platforms that wire PlaybackBuffer-backed transport override it and return SeekResult.Applied when the target is inside bufferedRange, or ahead of ingest on known-finite content (pending cursor). Live/unbounded flows must never be fully collected for seek; seek outside the retained window returns SeekResult.Unsupported.
When seekTo returns SeekResult.Unsupported on a session with supportsTransportSeek false, higher layers may fall back to a portable approach (Compose space.kodio.compose.PlayerState reloads a clipped PCM window). Transport sessions publish bufferedRange; out-of-window seeks stay SeekResult.Unsupported without inventing a second timeline.
knownByteCount / AudioFlow.isKnownFinite are length metadata and growable eligibility, not the sole seek gate.
Inheritors
Properties
Currently retained seekable window. Empty if nothing buffered. Defaults to a frozen empty range for unmigrated sessions.
Transport media time, best-effort while playing. Defaults to a frozen Duration.ZERO for unmigrated sessions.
A flow that emits the current state of the playback.
true when this session implements PlaybackBuffer-backed seek (bufferedRange / pending-cursor). Compose uses this to skip the PCM-window fallback even before the first non-empty bufferedRange is published.