We are using ElementVisibilityObserver in media element autoplay, of which the underlying implementation is using IntersectionObserver.
Now we are implementing a new behavior: play video when it's visible and pause it when it's invisible. However I found it does not work well when the page is zoomed.
1. Apply patch https://codereview.chromium.org/2654123002/
http://mounirlamouri.github.io/sandbox/autoplay/test.html
2. Build and install on Android
3. Navigate to http://mounirlamouri.github.io/sandbox/autoplay/test.html
4. Zoom out to the full page size and scroll. The last video should play when visible and pause when invisible. It can also be observed in `adb logcat`.
* Everything is fine so far *
5. While the last video is visible, pinch zoom on a position outside of the last video, until the video becomes invisible.
6. There's no log on the visibility. You need to scroll up very far away and then the visibility changes to false in the log.
I assume the visible viewport used by IntersectionObserver is wrong when the page is zoomed.
Comment 1 by rsgav...@chromium.org
, Jan 25 2017