KiteMediaOverlay

@Composable
fun KitePageOverlayScope.KiteMediaOverlay(allowRemote: Boolean = false, newPlayer: () -> KitePlayer? = { if (KitePlayer.isAvailable) KitePlayer() else null }, labels: KiteMediaLabels = KiteMediaLabels(), session: KiteMediaSession = KiteMediaSession.Default)(source)

Plays the <video> and <audio> elements of an EPUB page over the page (#31). Pass it as the viewer's page overlay:

KiteDocView(state, pageOverlay = { KiteMediaOverlay() })

Each element gets an EpubMediaPlayer on its box, so it moves and scales with the page, and the bar of a video can take it full screen. A page that is not an EPUB page, or has no media, draws nothing. An element starts no player until it starts to play, so a page of posters costs nothing. The elements share session: an element whose page comes back shows the place where it stopped, paused, and one element plays at a time.

Parameters

allowRemote

plays a source that the book names by an https URL. False by default, because such a source tells its server that the book was opened. A source of any other scheme never plays, http and file included (EPUB Reading Systems 3.3, 3.3 and 3.5).

newPlayer

makes the player of an element when it starts, or returns null where the platform cannot play. The default player plays through FFmpeg and the platform's audio output; pass { if (KitePlayer.isAvailable) KitePlayer(PlayerConfig(...)) else null } for settings of your own.

labels

the words of the controls, which a screen reader says. English by default.

session

what the elements share. See KiteMediaSession.