Package-level declarations

Types

Link copied to clipboard

A MediaSurfaceProvider whose surface is populated by a MediaSurfaceContainer composable — the inverse of the platform "walk the view tree to find a SurfaceView" providers. Construct one, hand it to a MediaManager, and render it inside Compose via MediaSurfaceContainer; the container creates the platform surface and pushes it into surface.

Functions

Link copied to clipboard

Hosts a platform-native video surface and binds the resulting MediaSurface to provider. The surface is detached on composition exit.

expect fun MediaSurfaceContainer(provider: MediaSurfaceProvider, modifier: Modifier = Modifier)

Hosts a platform-native video surface and binds the resulting MediaSurface to provider. The surface is detached on composition exit.

Hosts a platform-native video surface and binds the resulting MediaSurface to provider. The surface is detached on composition exit.

macOS implementation — currently a placeholder.

Web implementation. Compose Multiplatform renders to a <canvas>, so the player's <video> element cannot live inside the Compose tree. Instead this hosts a DOM container positioned (via onGloballyPositioned) to overlay the area this composable occupies, and binds it as the MediaSurface; the container — and the video the MediaManager appends to it — is removed on composition exit. Positions are in CSS pixels, converted from Compose pixels through the current density.