PiP window is black if video is not visible |
||||||||||||||||
Issue descriptionChrome Version : 71.0.3567.0 OS Version: 11135.0.0 I've noticed a bug with PiP and SurfaceLayer Media Streams. If <video> is not visible, the PiP window is always black. Steps to reproduce: 1. Go to https://beaufortfrancois.github.io/sandbox/media/picture-in-picture-get-user-media.html 2. Click "Toggle Picture-in-Picture" button 3. PiP window shows up with camera stream video 4. Click "Toggle video visibility" button What happens: PiP window becomes black What should happen: video in PiP window should continue playing.
,
Oct 11
Thanks for your feedback CJ! I was able to reproduce without MediaStream. If <video> is not visible, PiP window is black. In a non-MediaStream video, there is a play button in the PiP black window which allows user to start playback. In a MediaStream video, there is none. It means web developer has to call `video.play()` manually to start playback and video shows up in PiP window. I'm not sure how to fix it. WDYT Mounir?
,
Oct 12
,
Oct 24
,
Oct 24
From mlamouri@ in an email, pasted here to keep track of all the info. "I believe the issue comes from FrameDeliver which seems to be suspended when the page becomes hidden. I think I added in the VFS a flag to always submit frames and weirdly, we may want to do the same thing here and have another flag that will tell FrameDeliver to never suspend while we are in Picture-in-Picture."
,
Oct 24
So, from what I can tell, in the case that I'm testing (PiPing the MediaStream video in https://beaufortfrancois.github.io/sandbox/media/picture-in-picture-playground), no frames are being suspended, but the background is still black. It could be that there are two different issues happening here. When I was tracking down this issue, it seemed to be a problem with PiP specific code, not at the mediaplayer level.
,
Oct 24
So the reason why the background is always black is because of this line https://cs.chromium.org/chromium/src/chrome/browser/ui/views/overlay/overlay_window_views.cc?rcl=4667a219b729a7e3cb1dc6b31d3f5ca024715dd9&l=269 I don't understand fully what we would want it to be. I can pass opacity information through, and that solves the issue I'm looking at, but I'm not too sure what you all are trying to solve/would want things to look like.
,
Oct 24
*fully understand
,
Oct 25
This happens to be a side effect of using <video autplay muted>: they end up being paused when not visible which leads to this.
,
Oct 25
,
Oct 25
I've added steps to reproduce in the description. Please re-open as I can reproduce without "muted".
,
Oct 25
I think I've found the issue. See https://chromium-review.googlesource.com/c/chromium/src/+/1299003
,
Oct 25
,
Oct 25
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0c7cd64aec528b8355ed040fe502ffc8c7dee33c commit 0c7cd64aec528b8355ed040fe502ffc8c7dee33c Author: François Beaufort <beaufort.francois@gmail.com> Date: Thu Oct 25 21:45:36 2018 Always show mediastream video if Picture-in-Picture This CL makes sure that a mediastream video always get painted if it is in Picture-in-Picture. Bug: 893062 Change-Id: I0bf5fbe744a98155135dcade83e6ba7646d2f6b3 Reviewed-on: https://chromium-review.googlesource.com/c/1299003 Commit-Queue: François Beaufort <beaufort.francois@gmail.com> Reviewed-by: Emircan Uysaler <emircan@chromium.org> Cr-Commit-Position: refs/heads/master@{#602865} [modify] https://crrev.com/0c7cd64aec528b8355ed040fe502ffc8c7dee33c/content/renderer/media/stream/webmediaplayer_ms.cc [modify] https://crrev.com/0c7cd64aec528b8355ed040fe502ffc8c7dee33c/content/renderer/media/stream/webmediaplayer_ms.h
,
Oct 26
,
Oct 26
This bug requires manual review: M71 has already been promoted to the beta branch, so this requires manual review Please contact the milestone owner if you have questions. Owners: benmason@(Android), kariahda@(iOS), kbleicher@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 26
Tried checking the issue on latest chrome version 72.0.3592.0 using Mac 10.13.1 with the below mentioned steps. 1. Launched Chrome 2. Navigated to https://beaufortfrancois.github.io/sandbox/media/picture-in-picture-get-user-media.html 3. Clicked on "Toggle Picture-in-Picture" button 4. Then clicked on "Toggle video visibility" button In step 3 after clicking "Toggle Picture-in-Picture" button, Still observing the black screen. Attaching the screen cast of the same for reference. @François Beaufort: Could you please have a look at the screen cast and let us know if we have missed anything while testing the issue. And requesting you to help us in verifying the fix. Thanks!
,
Oct 26
fbeaufort@, PTAL comment #17 and verify the bug on latest canary, also pls provide merge justification. Thank you.
,
Oct 27
Picture-in-Picture window (in the corner) is not black anymore. So we're good. Thanks for testing vamshi.kommuri! govind@, we're aiming to experiment with Picture-in-Picture for MediaStreams in Beta M71. The intent is to be able to use a finch experiment.
,
Oct 27
Thank you fbeaufort@. Approving merge to M71 branch 3578 based on comment #19. Pls merge before 3:00 PM PT, Monday so we can pick it up for next week Beta release. Thank you.
,
Oct 27
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f8d863a28d55d9369058e31a8715b554867f3836 commit f8d863a28d55d9369058e31a8715b554867f3836 Author: François Beaufort <beaufort.francois@gmail.com> Date: Sat Oct 27 06:31:30 2018 Always show mediastream video if Picture-in-Picture This CL makes sure that a mediastream video always get painted if it is in Picture-in-Picture. Bug: 893062 Change-Id: I0bf5fbe744a98155135dcade83e6ba7646d2f6b3 Reviewed-on: https://chromium-review.googlesource.com/c/1299003 Commit-Queue: François Beaufort <beaufort.francois@gmail.com> Reviewed-by: Emircan Uysaler <emircan@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#602865}(cherry picked from commit 0c7cd64aec528b8355ed040fe502ffc8c7dee33c) Reviewed-on: https://chromium-review.googlesource.com/c/1303335 Reviewed-by: François Beaufort <beaufort.francois@gmail.com> Cr-Commit-Position: refs/branch-heads/3578@{#358} Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034} [modify] https://crrev.com/f8d863a28d55d9369058e31a8715b554867f3836/content/renderer/media/stream/webmediaplayer_ms.cc [modify] https://crrev.com/f8d863a28d55d9369058e31a8715b554867f3836/content/renderer/media/stream/webmediaplayer_ms.h
,
Oct 27
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f8d863a28d55d9369058e31a8715b554867f3836 Commit: f8d863a28d55d9369058e31a8715b554867f3836 Author: beaufort.francois@gmail.com Commiter: beaufort.francois@gmail.com Date: 2018-10-27 06:31:30 +0000 UTC Always show mediastream video if Picture-in-Picture This CL makes sure that a mediastream video always get painted if it is in Picture-in-Picture. Bug: 893062 Change-Id: I0bf5fbe744a98155135dcade83e6ba7646d2f6b3 Reviewed-on: https://chromium-review.googlesource.com/c/1299003 Commit-Queue: François Beaufort <beaufort.francois@gmail.com> Reviewed-by: Emircan Uysaler <emircan@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#602865}(cherry picked from commit 0c7cd64aec528b8355ed040fe502ffc8c7dee33c) Reviewed-on: https://chromium-review.googlesource.com/c/1303335 Reviewed-by: François Beaufort <beaufort.francois@gmail.com> Cr-Commit-Position: refs/branch-heads/3578@{#358} Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
,
Oct 27
,
Oct 31
Able to reproduce the issue on chrome version# 71.0.3578.20(Build without fix) Verified the fix on Mac 10.12.6 and Windows-10 on Chrome version #71.0.3578.30 as per the comment#0 Attaching screen cast for reference. Observed "video in PIP window continued playing" Hence, the fix is working as expected. Adding the verified label. Thanks! |
||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||
Comment 1 by lethalantidote@chromium.org
, Oct 11