Closed ezefranca closed 1 year ago
The showProductList
event is enabled when PlayerUIConfiguration
productList
property is set to hidden
and emitted when pressing the action bar product button and on the ended/paused curtain product button.
The issue you encountered, did that occur when returning from PiP and then pressing any of the above buttons in the player UI? which one of the buttons?
Regarding when the player is returning from PiP. We have in our roadmap to add event(s) when Pip is stopped.
Could you keep this issue open until when the PiP stopped (close) is released? BTW, thanks for the support, your team is doing a great product.
Yes of course. We keep it open until your issue is solved.
Not directly related to this issue, but one that we have discussed. We have added a call to the restorePlayer
call and a isPictureInPictureActive
PictureInPictureState so you could do something like this:
func didBecomeActive() {
if settings.shouldRestorePiPAutomatically && PictureInPictureState.shared.isPictureInPictureActive {
PictureInPictureState.shared.restorePlayer()
}
}
on e.g. a UIApplication.didBecomeActiveNotification notification to go back to fullscreen on entering the app again.
This will be available in the next release.
Hi,
Some new features in the 0.8 that might be of interest for you guys. We have added a PictureInPictureCloseComponent
protocol that is extended by UIView
and UIViewController
that has a registerPictureInPictureCloseAction
that takes a reference to a PictureInPictureState.CloseAction
that is called when closing a "parentless" picture-in-picture window.
Furthermore the PictureInPictureState
has a new function restorePlayer
that restores picture-in-picture playback back to fullscreen. Can be used e.g. if you want to restore back to fullscreen when returning to the app:
func didBecomeActive() {
if settings.shouldRestorePiPAutomatically && PictureInPictureState.shared.isPictureInPictureActive {
PictureInPictureState.shared.restorePlayer()
}
}
both of these features have examples in the demos.
Then we have added pictureInPictureRestoreToFullscreen
and pictureInPictureDidStop
evens. These works the same way as the corresponding callbacks in iOS AVPictureInPictureControllerDelegate
.
Happy coding and Friday!
@ezefranca did the new interfaces related to PiP in the 0.8 release work for you and was they of use for you? I e did they make your coding experience any easier :)
hello everyone, thank you so much for your work and this release. And thanks for the improvements on this release. You can close the issue :)
Great!
Hello bambuser team, happy new year.
We encountered an issue where the user returns from Picture in Picture and the player doesn’t update with the current list of products. So the user will be left with an empty or outdated product list until the screen receives the new update, which may only take seconds or minutes. The
showProductList
event is not called at the moment the player is returning from PiP, we need something like aviewWillAppear
. In our tests, after returning from PiP we got some cases when theshowProductList
took more than 4 minutes to be called.