PlayerViewRenderer

Renderer contract used by a platform player view.

The three counters form an exact lifetime ledger for frames accepted by the renderer: every accepted frame is eventually presented, superseded by a newer frame, or failed. Views expose these values across renderer rebuilds without knowing the concrete platform renderer type.

Inheritors

Properties

Link copied to clipboard
abstract val events: Flow<RendererEvent>
Link copied to clipboard
abstract val failedFrames: Long

Frames that could not be displayed for a reason other than supersession.

Link copied to clipboard
Link copied to clipboard
abstract val presentedFrames: Long

Frames that reached the platform display.

Link copied to clipboard
Link copied to clipboard
open val showsHdr: Boolean
Link copied to clipboard
abstract val supersededFrames: Long

Frames replaced by a newer frame before they reached the display.

Functions

Link copied to clipboard
open fun accepts(shape: FrameShape): Boolean
Link copied to clipboard
open fun clearPicture()
Link copied to clipboard
expect abstract fun close()
Link copied to clipboard
abstract suspend fun present(frame: VideoFrame, targetNanos: Long): Boolean
Link copied to clipboard
open fun setAdjustments(adjustments: VideoAdjustments)
Link copied to clipboard
open fun setHdrPolicy(policy: HdrPolicy)
Link copied to clipboard
abstract suspend fun setOverlay(overlay: SubtitleOverlay?)
Link copied to clipboard
open fun setRenderQuality(quality: RenderQuality)
Link copied to clipboard
open fun setScaleMode(mode: VideoScale)
Link copied to clipboard
open fun setTransform(transform: VideoTransform)
Link copied to clipboard
abstract fun setViewport(width: Int, height: Int, scale: Float)
Link copied to clipboard
Link copied to clipboard
abstract fun supports(format: PlayerPixelFormat): Boolean
Link copied to clipboard
abstract fun vsyncIntervalNanos(): Long?