NEW 272815
PIP video is blank when video element is within display: none container
https://bugs.webkit.org/show_bug.cgi?id=272815
Summary PIP video is blank when video element is within display: none container
Callionica
Reported 2024-04-17 05:02:13 PDT
On Safari, if you have a PIP video and you make its container `display: none`, the video will keep playing normally and the video will be visible. But if you start a new video while the container is display: none, the audio plays but the PIP window is black. Making the container visible during playback, makes the video appear again in the PIP window. On Chrome, the PIP window always displays the video regardless of the `display` setting for the `video` container. Chrome behaviour is better in this case. Is there ever a situation in which you’d want a black PIP window for a `video`? Either as a developer or a user? If Safari blanked the PIP window as soon as the container went `display: none`, Safari might have a case for a useful, consistent behaviour, but this doesn’t seem very useful as it is. It’d be much more useful for the PIP window to always display the video and if you changed Safari to get this useful behaviour, we’d also get cross-browser consistency.
Attachments
Repro of the behavior (2.75 KB, text/html)
2024-04-18 16:25 PDT, Callionica
no flags
Karl Dubost
Comment 1 2024-04-18 02:09:21 PDT
Callionica, did you test with Firefox too? What is the behavior there? It would be cool if there was a reduced testcase to play with. Extracting the info above: https://vimeo.com/channels/staffpicks/931894560 "display: none" activated on container AFTER video starts AFTER Safari visible Firefox visible Chrome visible For the second case, how do you start the PIP if the video container is not visible? Here a test case would be useful.
Callionica
Comment 2 2024-04-18 16:25:10 PDT
Created attachment 470995 [details] Repro of the behavior Step-by-step repro of the bug with a description at each step and buttons to press for each action.
Callionica
Comment 3 2024-04-18 16:34:10 PDT
I've attached a demo page that walks through everything. The steps are: 1. Video container visible 2. Video loads 3. Activate PIP 4. Play video 5. Hide video container 6. Load new video 7. Play video 8. PROBLEM: PIP window visible, audio playing, but video content not visible Imagine you have a tabbed UI with the video on one of the pages and you want to use PIP to let the user see the video as they view other pages of the UI. The current Safari behavior makes that hard.
Radar WebKit Bug Importer
Comment 4 2024-04-24 05:03:15 PDT
Ahmad Saleem
Comment 5 2024-04-24 07:34:07 PDT
(In reply to Callionica from comment #3) > I've attached a demo page that walks through everything. The steps are: > 1. Video container visible > 2. Video loads > 3. Activate PIP > 4. Play video > 5. Hide video container > 6. Load new video > 7. Play video > 8. PROBLEM: PIP window visible, audio playing, but video content not visible > > Imagine you have a tabbed UI with the video on one of the pages and you want > to use PIP to let the user see the video as they view other pages of the UI. > The current Safari behavior makes that hard. Firefox Nightly 127 shows video, which would make it match Chrome Canary 125. While Safari does not show video in PIP. I think it is more about 'src' change issue.
Note You need to log in before you can comment on or make changes to this bug.