Skip to content

Commit

Permalink
PiP should be started with slight delays. Otherwise PiP listener even…
Browse files Browse the repository at this point in the history
…ts are not being fired when app is initially started. Some kind of Av player internal issue probably.
  • Loading branch information
peeterkask committed Oct 4, 2024
1 parent 7e34251 commit 340278b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/Video/Features/RCTPictureInPicture.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ import React
guard let _pipController else { return }

if _isActive && !_pipController.isPictureInPictureActive {
DispatchQueue.main.async {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) {
_pipController.startPictureInPicture()
}
} else if !_isActive && _pipController.isPictureInPictureActive {
Expand Down

0 comments on commit 340278b

Please sign in to comment.