KiteVideoState

The connection between a player and KiteVideo: it owns the renderer the player draws through and the one snapshot slot the draw phase reads.

val video = rememberKiteVideoState()
val player = remember { KitePlayer.create(PlayerConfig(backends = mobileBackends())) }
player.attachRenderer(video.renderer)
KiteVideo(video, Modifier.clip(RoundedCornerShape(24.dp)))

Built outside composition, close renderer when done; rememberKiteVideoState does that automatically when it leaves composition. Closing is always safe while the player still holds the renderer: a closed renderer refuses frames and the engine counts them, exactly like every other renderer in this library.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Frames that published nothing for a reason other than being superseded.

Link copied to clipboard

The measured CPU cost of the software path per published frame. On an emulator this is provisional evidence; the numbers that count are re-taken on devices.

Link copied to clipboard

Frames whose picture was published for drawing.

Link copied to clipboard

Attach this to the player. Close it when the video surface is done (or use rememberKiteVideoState).

Link copied to clipboard

Frames replaced by a newer one before they could be converted.