Closed PhantomPainX closed 1 year ago
If anyone still experiencing the error
I forgot to post and didn't add a PR after I resolved this weeks ago because this was on purpose in the following observer in CapacitorVideoPlayerPlugin.Observers
willResignObserver =
NotificationCenter.default.addObserver(
forName: UIApplication.willResignActiveNotification,
object: nil, queue: nil) { (_) in
if !isInPIPMode &&
self.videoPlayerFullScreenView != nil {
// release video tracks
if let playerItem = self.videoPlayerFullScreenView?
.playerItem {
self.videoTrackEnable(playerItem: playerItem,
enable: false)
}
}
}
It just disables the video when a system process overlays the video player like Siri, control center, notification panel, etc. The video is not shown again unless we fire a foregroundObserver event.
I just moved the code inside backgroundObserver and it works the same way without affecting the app.
@PhantomPainX this is not really clear for me.Why not do a PR so everyone can benefit from it.
@PhantomPainX this is not really clear for me.Why not do a PR so everyone can benefit from it.
I didn't make a PR because that code was there on purpose, maybe for some reason. But if you want I will do the PR, no problem 👌
@PhantomPainX i will have a deeper look. Thanks
I don't if it happens to anyone but I'm having this issue when I use the plugin in iOS devices.
Basically the steps to reproduce it is:
This video shows it better: https://www.veed.io/view/d42c3186-0c5a-40b6-a634-488d13dfb077?sharingWidget=true&panel=share