Skip to content

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

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,
  )
|

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions