You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need 2 tabs (A and B) both with video content, each of them needs to be at a non-zero progress position (eg: at the middle of the stream)
From tab A start the video, launch in full screen, switch to picture in picture
Select tab B
Notice that tab B is "fixed up" (by play and pause), but that pauses the picture in picture (PIP) playback
Recording:
RPReplay_Final1724573838.MP4
Initial investigation:
It seems we have opposing forces:
if a video content re-appears we want to "fix it" with play + pause, so it's not causing the black screen issue
currently we only fixing it if the current tab's browser is not using Picture in Picture (and has some progress, meaning it's not the poster)
the issue is that the picture in picture video can come from another tab, further more it can even come from a tab, that has been closed, as closing the tab won't close picture in picture (which in itself is correct).
Note: we have a separate webView/browser instance per tab.
Possible solution:
Unfortunately from swift there seems to be no easy way to get to the picture in picture video player that was created by the WKWebView
With some not so elegant JS code, by listening on each video elements entering picture and picture, and leaving picture in picture events we can get this information about individual webViews, but we need to pass these back from all webView instances to swift and gather them in one place, so we can track if we have any picture in picture or not, since a single webView is not even aware of existence of other webViews.
This way we could potentially fix the current issue, BUT:
it would open up the possibility to have the black screen issue again. Under the condition of foregrounding the Kiwix app and landing on tab B, while tab A's picture in picture video was playing all the time
iPadOS 17.5
Used content:
Steps to reproduce:
Recording:
RPReplay_Final1724573838.MP4
Initial investigation:
It seems we have opposing forces:
Note: we have a separate webView/browser instance per tab.
Possible solution:
Unfortunately from swift there seems to be no easy way to get to the picture in picture video player that was created by the WKWebView
With some not so elegant JS code, by listening on each video elements entering picture and picture, and leaving picture in picture events we can get this information about individual webViews, but we need to pass these back from all webView instances to swift and gather them in one place, so we can track if we have any picture in picture or not, since a single webView is not even aware of existence of other webViews.
This way we could potentially fix the current issue, BUT:
Question:
I think it's a rare corner case, so worth to discuss if fixing it in a very complicate way is the way to go.
The text was updated successfully, but these errors were encountered: