KiteMediaSession

class KiteMediaSession(val audioInBackground: BackgroundPolicy = BackgroundPolicy.PauseAll)(source)

What the media elements of the books an app shows share (#481):

  • The place where each element stopped, while its book is open. When the page of an element comes back, the element shows that place, paused, with the sound and the speed it had.

  • One element plays at a time. Starting one pauses any other that plays.

  • What playback does when the app leaves the screen. A video pauses, and an audio element follows audioInBackground.

KiteMediaOverlay uses Default unless it gets a session of its own. Call its members on the main thread.

Parameters

audioInBackground

what an audio element does when the app leaves the screen, on Android and iOS. BackgroundPolicy.PauseAll, the default, pauses it and plays it again on return. BackgroundPolicy.ContinueAudio keeps the sound, which on Android also needs the app's own media notification to keep the process alive. A desktop window keeps playing when it is hidden, as desktop players do.

Constructors

Link copied to clipboard
constructor(audioInBackground: BackgroundPolicy = BackgroundPolicy.PauseAll)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val audioInBackground: BackgroundPolicy