Skip to main content

background_action

Function background_action 

Source
pub fn background_action(
    is_video: bool,
    background_audio_armed: bool,
    in_picture_in_picture: bool,
) -> BackgroundAction
Expand description

Decide what backgrounding should do.

  • is_video — whether the current item has a picture to lose. Music is never paused by backgrounding; that is what a music player is for.
  • background_audio_armed — the per-player toggle (UR-040).
  • in_picture_in_picture — the app is not “gone”, it is in a floating window and still visible. Pausing here would break PiP (UR-041).

TRACES: UR-040, UR-041 | DR-224 | UT-211