r***@yandex-team.ru
2018-11-20 12:17:54 UTC
Hello all.
It's about this commit: https://codereview.chromium.org/2696893002.
Why use the check_viewport_intersection_timer_ timer (formerly
m_checkViewportIntersectionTimer), why not call the
Oncheckviewportintersectiontimerfried method synchronously?
Now there is such a problem with the PiP mode:
0. Android device >= 8.0, hardware navigation buttons
1. go to page, containing video and run it
2. go to full screen mode
3. immediately minimize the browser
as a result, the PIP window is not displayed. If wait a moment in #3, the
PiP window will be normally displayed.
This is because the PictureInPictureController checks
webContents.hasActiveEffectivelyFullscreenVideo() when starting PiP window;
video availability is specified by calling
VideoElement().SetIsEffectivelyFullscreen(...) in the
MediaCustomControlsFullscreenDetector::OnCheckViewportIntersectionTimerfired(...)
method. Because OnCheckViewportIntersectionTimerfired is called
asynchronously, webContents.hasActiveEffectivelyFullscreenVideo() at the
moment returns stale data.
For the experiment, I made a call to the
OnCheckViewportIntersectionTimerfired method synchronous, and PiP began to
show normally in the specified situation.
In the review, there are such comments:
xjz 2017/02/24 18:30: 10
The logic sgtm. Just ooc, if the video is the current fullscreen element,
do you
still need to start timer and check whether it is dominant? The fullscreen
might
already be a strong indicator. WDYT?
Zhiqiang Zhang (Slow) 2017/02/25 18:48: 27
That would bring in several more if-else's. I'd prefer keep the logic
simpler.
https://codereview.chromium.org/2696893002/diff/140001/third_party/WebKit/Source/core/html/MediaCustomControlsFullscreenDetector.cpp#newcode131
Maybe there is some right way to get rid of the timer and delay?
It's about this commit: https://codereview.chromium.org/2696893002.
Why use the check_viewport_intersection_timer_ timer (formerly
m_checkViewportIntersectionTimer), why not call the
Oncheckviewportintersectiontimerfried method synchronously?
Now there is such a problem with the PiP mode:
0. Android device >= 8.0, hardware navigation buttons
1. go to page, containing video and run it
2. go to full screen mode
3. immediately minimize the browser
as a result, the PIP window is not displayed. If wait a moment in #3, the
PiP window will be normally displayed.
This is because the PictureInPictureController checks
webContents.hasActiveEffectivelyFullscreenVideo() when starting PiP window;
video availability is specified by calling
VideoElement().SetIsEffectivelyFullscreen(...) in the
MediaCustomControlsFullscreenDetector::OnCheckViewportIntersectionTimerfired(...)
method. Because OnCheckViewportIntersectionTimerfired is called
asynchronously, webContents.hasActiveEffectivelyFullscreenVideo() at the
moment returns stale data.
For the experiment, I made a call to the
OnCheckViewportIntersectionTimerfired method synchronous, and PiP began to
show normally in the specified situation.
In the review, there are such comments:
xjz 2017/02/24 18:30: 10
The logic sgtm. Just ooc, if the video is the current fullscreen element,
do you
still need to start timer and check whether it is dominant? The fullscreen
might
already be a strong indicator. WDYT?
Zhiqiang Zhang (Slow) 2017/02/25 18:48: 27
That would bring in several more if-else's. I'd prefer keep the logic
simpler.
https://codereview.chromium.org/2696893002/diff/140001/third_party/WebKit/Source/core/html/MediaCustomControlsFullscreenDetector.cpp#newcode131
Maybe there is some right way to get rid of the timer and delay?
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/667bae95-0193-4628-9d8a-dc376577df90%40chromium.org.
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/667bae95-0193-4628-9d8a-dc376577df90%40chromium.org.