No audio on animated page with the attached fixed layout epub
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Jun 2015 21:33:05 +0000 (21:33 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Jun 2015 21:33:05 +0000 (21:33 +0000)
commit7decd02db8f8158f1814ef1bb33b85d097ba2d3f
tree81ed26fbbf6555255e48cdd41bc97aab20cf4b85
parent535467e50469b7f6d27fb8198031d163af53aa51
No audio on animated page with the attached fixed layout epub
https://bugs.webkit.org/show_bug.cgi?id=146365
Source/WebCore:

Reviewed by Eric Carlson.

The new restriction RequireUserGestureForAudioRateChange conflicted
with existing clients who expected RequireUserGestureForRateChange
to allow autoplaying audio. Update the logic to ensure that
RequireUserGestureForRateChange covers all media when set to
false.

This may require a revisit once we're using RequireUserGestureForAudioRateChange
in production, because the global setting will trump that, and
most clients have the global setting to false. We'll need to come
up with a way to allow legacy clients to preserve their behaviour.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Only restrict audio
if RequireUserGestureForRateChange is also false.

LayoutTests:

<rdar://problem/21360354>

Reviewed by Eric Carlson.

The test to ensure audio needs a user gesture now needs to also
restrict the general case.

* media/audio-playback-restriction-play.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/audio-playback-restriction-play.html
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp