Package-level declarations

Types

Link copied to clipboard
class KiteMediaLabels(val play: String = "Play", val pause: String = "Pause", val mute: String = "Mute", val unmute: String = "Unmute", val seek: String = "Seek", val speed: String = "Playback speed", val fullScreen: String = "Full screen", val exitFullScreen: String = "Exit full screen", val subtitles: String = "Subtitles", val subtitlesOff: String = "Off")

The words of the media controls that KiteMediaOverlay draws, which a screen reader says (#484). English by default. Pass your own to translate them:

Link copied to clipboard
class KiteMediaSession(val audioInBackground: BackgroundPolicy = BackgroundPolicy.PauseAll)

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

Properties

Link copied to clipboard

The id of the KiteHighlight that KiteReadAloud keeps on the text it reads.

Functions

Link copied to clipboard
@Composable
fun EpubMediaPlayer(media: EpubMedia, document: EpubDocument, modifier: Modifier = Modifier, allowRemote: Boolean = false, newPlayer: () -> KitePlayer? = { if (KitePlayer.isAvailable) KitePlayer() else null }, labels: KiteMediaLabels = KiteMediaLabels(), session: KiteMediaSession = KiteMediaSession.Default, place: String? = null)

A player for one media element of an EPUB page, drawn over the poster that the page paints at EpubMedia.rect (HTML, 4.8.11).

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

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

Link copied to clipboard
@Composable
fun KiteReadAloud(state: KiteDocViewState, playing: Boolean, color: Color? = null, newPlayer: () -> KitePlayer? = { if (KitePlayer.isAvailable) KitePlayer() else null }, bookStyles: Boolean = true, speak: suspend (clip: EpubOverlayClip, text: List<KiteReadingItem>) -> Unit? = null, onClip: (EpubOverlayClip?) -> Unit = {}, onFinished: () -> Unit = {})

Reads an EPUB aloud with the narration it ships, its media overlays, and follows the text in the viewer of state (#36). Place it next to the viewer, and switch playing from your own controls: