WebCanvasRendererFactory

class WebCanvasRendererFactory(canvas: JsAny, keepDisplayAwake: Boolean = true) : VideoRendererFactory

The default KiteFFmpeg adapter for a web canvas.

The same job MobileAndroidPlayerViewRendererFactory does on Android and for the same reason: :kiteplayer-output may not depend on KiteFFmpeg, so the module that depends on BOTH is where the two are introduced. On Android that seam hands back a ByteArray; here it fills a JS array, because on the web a ByteArray of pixels is the twenty-times-slower path.

Parameters

canvas

the HTMLCanvasElement or OffscreenCanvas to draw into.

keepDisplayAwake

whether the page's screen stays awake while pictures are drawn, and for two seconds after the last one (#238). See WebCanvasVideoRenderer.

Constructors

Link copied to clipboard
constructor(canvas: JsAny, keepDisplayAwake: Boolean = true)
constructor(canvas: JsAny)

Keeps the original canvas constructor with display wake enabled.

Properties

Link copied to clipboard
open override val name: String

Functions

Link copied to clipboard
open suspend override fun create(): VideoRenderer