diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2012-07-20 14:03:14 -0700 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2012-07-24 10:38:44 -0700 |
commit | 9abcc8af97ee9c535e4d0995b564471b3866f9e4 (patch) | |
tree | 635e8469027a0efdc0781abe616943c3f433d2f7 /Source/WebCore/html | |
parent | ad46784d9075ff6d1e11cd2be47a6169761b0eeb (diff) | |
download | external_webkit-9abcc8af97ee9c535e4d0995b564471b3866f9e4.zip external_webkit-9abcc8af97ee9c535e4d0995b564471b3866f9e4.tar.gz external_webkit-9abcc8af97ee9c535e4d0995b564471b3866f9e4.tar.bz2 |
Support autoplay attribute for media element, with optional gesture requirement.
bug:6806306
Change-Id: I09a7494278be5631d64d125390559058682386d1
Diffstat (limited to 'Source/WebCore/html')
-rw-r--r-- | Source/WebCore/html/HTMLMediaElement.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp index 693f214..f3cc170 100644 --- a/Source/WebCore/html/HTMLMediaElement.cpp +++ b/Source/WebCore/html/HTMLMediaElement.cpp @@ -1036,7 +1036,10 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state) if (isPotentiallyPlaying && oldState <= HAVE_CURRENT_DATA) scheduleEvent(eventNames().playingEvent); - +#if PLATFORM(ANDROID) + // autoplay should not be honored if we require user gesture. + if (!(m_restrictions & RequireUserGestureForRateChangeRestriction)) +#endif if (m_autoplaying && m_paused && autoplay()) { m_paused = false; invalidateCachedTime(); |