Package-level declarations

Types

Link copied to clipboard
@UnstableApi
class AudioLevelProcessor : BaseAudioProcessor
Link copied to clipboard

Manages fullscreen functionality for the video player

Link copied to clipboard

Represents the initial state of the player after opening a media file or URI.

Link copied to clipboard

Defines a platform-specific video player state interface, providing the essential properties and operations needed for video playback management.

Link copied to clipboard
@Stable
data class SubtitleTrack(val label: String, val language: String, val src: String)
Link copied to clipboard
enum SurfaceType : Enum<SurfaceType>
Link copied to clipboard
@Stable
data class VideoMetadata(var title: String? = null, var duration: Long? = null, var width: Int? = null, var height: Int? = null, var bitrate: Long? = null, var frameRate: Float? = null, var mimeType: String? = null, var audioChannels: Int? = null, var audioSampleRate: Int? = null)

Represents metadata information of a video file.

Link copied to clipboard
sealed class VideoPlayerError

Represents different types of errors that can occur during video playback in a video player.

Link copied to clipboard
@UnstableApi
@Stable
actual open class VideoPlayerState
@Stable
expect open class VideoPlayerState

Represents the state and controls for a video player. This class provides properties and methods to manage video playback, including play, pause, stop, seeking, and more. It maintains information about the playback state, such as whether the video is currently playing, volume levels, and playback position.

@Stable
actual open class VideoPlayerState
@Stable
actual open class VideoPlayerState

Represents the state and behavior of a video player. This class provides properties and methods to control video playback, manage the playback state, and interact with platform-specific implementations.

@Stable
actual open class VideoPlayerState

Implementation of VideoPlayerState for WebAssembly/JavaScript platform. Manages the state of a video player including playback controls, media information, and error handling.

Functions

Link copied to clipboard
@Composable
fun openFullscreenView(playerState: VideoPlayerState, renderSurface: @Composable (VideoPlayerState, Modifier, Boolean) -> Unit)

Opens a fullscreen view for the video player on iOS. This function is called when the user toggles fullscreen mode.

Link copied to clipboard

Creates and manages an instance of VideoPlayerState within a composable function, ensuring proper disposal of the player state when the composable leaves the composition. This function is used to remember the video player state throughout the composition lifecycle.

Link copied to clipboard
fun setupVideoElement(video: HTMLVideoElement, playerState: VideoPlayerState, scope: CoroutineScope, enableAudioDetection: Boolean = true, useCors: Boolean = true, onCorsError: () -> Unit = {})
Link copied to clipboard
fun PlatformFile.toUriString(): String

Converts a PlatformFile to a URI string that can be used by the media player.

Link copied to clipboard
@UnstableApi
@Composable
actual fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier, contentScale: ContentScale, overlay: () -> Unit)
@UnstableApi
@Composable
fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier = Modifier, contentScale: ContentScale = ContentScale.Fit, surfaceType: SurfaceType = SurfaceType.TextureView, overlay: @Composable () -> Unit = {})
@Composable
expect fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier = Modifier, contentScale: ContentScale = ContentScale.Fit, overlay: @Composable () -> Unit = {})

Renders a video player surface that displays and controls video playback.

@Composable
actual fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier, contentScale: ContentScale, overlay: () -> Unit)
@Composable
actual fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier, contentScale: ContentScale, overlay: () -> Unit)

Composable function for rendering a video player surface.

@Composable
actual fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier, contentScale: ContentScale, overlay: () -> Unit)
Link copied to clipboard
@Composable
fun VideoPlayerSurfaceImpl(playerState: VideoPlayerState, modifier: Modifier, contentScale: ContentScale, overlay: @Composable () -> Unit, isInFullscreenView: Boolean = false, pauseOnDispose: Boolean = true)
Link copied to clipboard
fun Modifier.videoRatioClip(videoRatio: Float?, contentScale: ContentScale = ContentScale.Fit): Modifier