Audible autoplay videos should not get paused when outside the viewport
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Apr 2017 22:04:50 +0000 (22:04 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Apr 2017 22:04:50 +0000 (22:04 +0000)
commit3c35a1a6e7aa5bb1edd7c5e254407c91e386cff4
tree3022b962fa0f035769fad5af3eaa85893a00d8e8
parentdf695d20fe3d8057473e43105cf8721a511aaab0
Audible autoplay videos should not get paused when outside the viewport
https://bugs.webkit.org/show_bug.cgi?id=170610
<rdar://problem/31505984>

Reviewed by Eric Carlson.

Source/WebCore:

Audible autoplay videos should not get paused when outside the viewport as this
would be observable by the user.

Test: media/video-restricted-invisible-autoplay-allowed-if-audible.html

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::autoplayPermitted):

LayoutTests:

Add layout test coverage.

* media/video-restricted-invisible-autoplay-allowed-if-audible-expected.txt: Added.
* media/video-restricted-invisible-autoplay-allowed-if-audible.html: Copied from LayoutTests/media/video-restricted-invisible-autoplay-not-allowed.html.
* media/video-restricted-invisible-autoplay-allowed-when-visible.html:
* media/video-restricted-invisible-autoplay-not-allowed.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/video-restricted-invisible-autoplay-allowed-if-audible-expected.txt [new file with mode: 0644]
LayoutTests/media/video-restricted-invisible-autoplay-allowed-if-audible.html [new file with mode: 0644]
LayoutTests/media/video-restricted-invisible-autoplay-allowed-when-visible.html
LayoutTests/media/video-restricted-invisible-autoplay-not-allowed.html
Source/WebCore/ChangeLog
Source/WebCore/html/MediaElementSession.cpp