Companion

object Companion

The limits of one overlay. Cues past them are not drawn, and the engine warns once with io.github.yuroyami.kiteplayer.PlaybackWarning.SubtitlesNotDrawn. Ordinary subtitles stay far below every limit.

Properties

Link copied to clipboard
const val MAX_CUE_LENGTH: Int

The most UTF-16 code units of one cue's text that a rasterizer lays out.

Link copied to clipboard
const val MAX_CUES: Int = 256

The most cues that one overlay draws. Each region of a bitmap cue counts as one cue.

Link copied to clipboard

The most pixels that the images of one overlay hold together, at any viewport size.

Link copied to clipboard

The most styled spans that one overlay lays out, over all of its cues.

Link copied to clipboard

The most UTF-16 code units of text that one overlay lays out, over all of its cues.

Link copied to clipboard

The largest viewport width or height that a rasterizer draws for, in pixels.

Functions

Link copied to clipboard

The part of cues that one overlay lays out, in order: at most MAX_CUES cues, at most MAX_CUE_LENGTH code units of text in each, and at most MAX_OVERLAY_TEXT_LENGTH code units and MAX_OVERLAY_SPANS spans over all of them. The cue that reaches a limit is cut there, and the cues after it are left out. A cut never splits a surrogate pair.

Link copied to clipboard
fun overlayPixelBudget(viewportWidth: Int, viewportHeight: Int): Long

The most pixels that the images of one overlay hold together for a viewport of viewportWidth by viewportHeight: four viewports, and at most MAX_OVERLAY_PIXELS.