Skip to main content

## decide_playback_kind

# Function decide_playback_kind

Source

    pub fn decide_playback_kind(
        source: &NegotiatedSource,
        audio_forces_transcode: bool,
        audio_track_pinned: bool,
    ) -> PlaybackKind

Expand description

The direct-play / direct-stream / transcode decision.

A free function, and pure, so every branch can be tested against `PlaybackInfo` fixtures without a server standing behind it.

Order matters: the two client-side overrides come first, because both describe cases where the server’s answer is right about the file and wrong about what this app will do with it. The server judges the file against the profile we sent; it cannot know that this renderer will be handed the audio separately, or that the viewer has pinned a track the file does not default to.

TRACES: UR-079 | DR-228 | UT-213