Skip to content

Supporting the resumption of the player's state among multiple VideoPlayerSurfaces #137

@kjsolo

Description

@kjsolo

Thanks

val url = ""
var toggle =  by remember { mutableStateOf(false) }
val playerState = rememberVideoPlayerState()

LaunchedEffect(url) {
  playerState.openUri(playUrl, InitialPlayerState.PLAY)
}

if (toggle) {
  VideoPlayerSurface(
    playerState = playerState,
  )
} {
  VideoPlayerSurface(
    playerState = playerState,
  )
|

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions