Skip to content

Commit

Permalink
fixed #29
Browse files Browse the repository at this point in the history
  • Loading branch information
DatL4g committed Feb 19, 2023
1 parent ae9806f commit 2ea800e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@ fun VideoPlayer(component: VideoComponent) {
component.seekListener = {
exoPlayer.seekTo(it)
}
withContext(Dispatchers.Main) {
exoPlayer.setMediaItem(MediaItem.fromUri(stream))
exoPlayer.prepare()
}
}

DisposableEffect(
Expand All @@ -187,6 +183,9 @@ fun VideoPlayer(component: VideoComponent) {
}

layoutParams = FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT)

exoPlayer.setMediaItem(MediaItem.fromUri(stream))
exoPlayer.prepare()
}
}, update = {
it.apply {
Expand Down

0 comments on commit 2ea800e

Please sign in to comment.