Picture-in-Picture video is stretched in window |
||||||||||||
Issue descriptionChrome Version : 70.0.3519.3 (Official Build) canary (64-bit) What steps will reproduce the problem? 1. The chrome://flags/#enable-surfaces-for-videos flag must be enabled. 2. Go to https://www.youtube.com/watch?v=hflnlhJz554 3. Right-click twice on video and click "Picture in picture" 4. Click on a video thumbnail that is NOT squared (1:1). What is the expected result? Video inside Picture-in-Picture window should sized properly. What happens instead of that? Video inside Picture-in-Picture window is stretched.
,
Aug 13
,
Aug 18
,
Aug 28
When switching between videos, YouTube doesn't update with a new surface ID, so there's no way for PiP to know to resize.
,
Aug 29
,
Aug 29
,
Aug 29
YouTube actually send surface IDs updates. The problem is the fact that PiP window is visible when asked about updating video size. See https://bugs.chromium.org/p/chromium/issues/detail?id=855059 void OverlayWindowViews::UpdateVideoSize(const gfx::Size& natural_size) { DCHECK(!natural_size.IsEmpty()); natural_size_ = natural_size; SetAspectRatio(gfx::SizeF(natural_size_)); if (IsVisible()) return; // Update the views::Widget bounds to adhere to sizing spec. This will also // update the layout of the controls. SetBounds(CalculateAndUpdateWindowBounds()); } We should find a way to update video bounds without resetting pip window to its default location. Note that Safari does this perfectly.
,
Aug 30
WIP at https://chromium-review.googlesource.com/c/chromium/src/+/1196363
,
Aug 31
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cef06981ddddf998678accb950a697cbf08ddbbe commit cef06981ddddf998678accb950a697cbf08ddbbe Author: François Beaufort <beaufort.francois@gmail.com> Date: Fri Aug 31 19:52:08 2018 Keep Picture-in-Picture window size in sync with video size. This makes sure Picture-in-Picture window always shows up inside the work area when surface ID is updated. Bug: 873657 Change-Id: Ibc9a640d527f51e5311a411b86af23eb61617f37 Reviewed-on: https://chromium-review.googlesource.com/1196363 Reviewed-by: apacible <apacible@chromium.org> Commit-Queue: François Beaufort <beaufort.francois@gmail.com> Cr-Commit-Position: refs/heads/master@{#588130} [modify] https://crrev.com/cef06981ddddf998678accb950a697cbf08ddbbe/chrome/browser/ui/views/overlay/overlay_window_views.cc
,
Sep 3
Able to reproduce this issue on reported version hence verifying the fix on latest canary 71.0.3541.0 using Mac 10.13.6, Windows 10 and Debian. Now PiP video is sized accordingly when surface ID is udpated. Attaching screencast for reference. As fix is working as expected adding Verified labels. Thanks!
,
Sep 6
,
Sep 7
Your change meets the bar and is auto-approved for M70. Please go ahead and merge the CL to branch 3538 manually. Please contact milestone owner if you have questions. Owners: benmason@(Android), kariahda@(iOS), geohsu@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 7
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/190e606fab0d5bca4ed02e5b96d8357012862292 commit 190e606fab0d5bca4ed02e5b96d8357012862292 Author: François Beaufort <beaufort.francois@gmail.com> Date: Fri Sep 07 07:54:34 2018 Keep Picture-in-Picture window size in sync with video size. This makes sure Picture-in-Picture window always shows up inside the work area when surface ID is updated. Bug: 873657 Change-Id: Ibc9a640d527f51e5311a411b86af23eb61617f37 Reviewed-on: https://chromium-review.googlesource.com/1196363 Reviewed-by: apacible <apacible@chromium.org> Commit-Queue: François Beaufort <beaufort.francois@gmail.com> Cr-Original-Commit-Position: refs/heads/master@{#588130}(cherry picked from commit cef06981ddddf998678accb950a697cbf08ddbbe) Reviewed-on: https://chromium-review.googlesource.com/1212844 Reviewed-by: François Beaufort <beaufort.francois@gmail.com> Cr-Commit-Position: refs/branch-heads/3538@{#127} Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811} [modify] https://crrev.com/190e606fab0d5bca4ed02e5b96d8357012862292/chrome/browser/ui/views/overlay/overlay_window_views.cc
,
Sep 12
Able to reproduce this issue on reported version hence verifying the fix on latest dev 70.0.3538.16 using Mac 10.13.6, Windows 10 and Debian. Now PiP video is sized accordingly when surface ID is updated. Attaching screencast for reference. As fix is working as expected adding Verified labels. Thanks! |
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by mlamouri@chromium.org
, Aug 13Status: Assigned (was: Untriaged)