Skip to content

Commit

Permalink
fix: inverted condition breaking PiP
Browse files Browse the repository at this point in the history
  • Loading branch information
krocard committed Dec 7, 2023
1 parent 653fcd2 commit ae6f3da
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class RNPlayerViewManager(private val context: ReactApplicationContext) : Simple
private fun setPictureInPicture(view: RNPlayerView, isPictureInPictureRequested: Boolean) {
handler.postAndLogException {
val playerView = view.playerView ?: throw IllegalStateException("The player view is not yet created")
if (playerView.isPictureInPicture != isPictureInPictureRequested) return@postAndLogException
if (playerView.isPictureInPicture == isPictureInPictureRequested) return@postAndLogException
if (isPictureInPictureRequested) {
playerView.enterPictureInPicture()
} else {
Expand Down

0 comments on commit ae6f3da

Please sign in to comment.