Open Bug 1822417 Opened 2 years ago Updated 2 years ago

Use IntersectionObserver for checking whether invisible autoplay video should be paused/resumed

Categories

(Core :: Audio/Video: Playback, task, P3)

task

Tracking

()

People

(Reporter: alwu, Assigned: alwu)

References

Details

Alternatively, if the element is a video element, the user agent may start observing whether the element intersects the viewport. When the element starts intersecting the viewport, if the element is still eligible for autoplay, run the substeps above. Optionally, when the element stops intersecting the viewport, if the can autoplay flag is still true and the autoplay attribute is still specified, run the following substeps:

Per spec, it seems we should use the IntersectionObserver for detecting that, rather than checking the visibility of the media element.

You need to log in before you can comment on or make changes to this bug.