diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2011-12-12 14:39:04 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2011-12-13 11:12:40 -0800 |
commit | d649883ce629c0de432e075254b517a50685792e (patch) | |
tree | 4fcce956db39661a16d5e002715b8ef3ad772feb /Source/WebCore/html | |
parent | d07292c75082db457ad498747c0b05d38a14e8d7 (diff) | |
download | external_webkit-d649883ce629c0de432e075254b517a50685792e.zip external_webkit-d649883ce629c0de432e075254b517a50685792e.tar.gz external_webkit-d649883ce629c0de432e075254b517a50685792e.tar.bz2 |
Tap to play/pause for html5 video with UI
bug:4232704
Change-Id: Ice99bc0fa19de93627fe8ffb91085838fa682315
Diffstat (limited to 'Source/WebCore/html')
-rw-r--r-- | Source/WebCore/html/HTMLMediaElement.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp index 023e8d2..6407f9f 100644 --- a/Source/WebCore/html/HTMLMediaElement.cpp +++ b/Source/WebCore/html/HTMLMediaElement.cpp @@ -2402,6 +2402,12 @@ void HTMLMediaElement::defaultEventHandler(Event* event) } #endif +#if PLATFORM(ANDROID) + // It is really hard to hit the play/pause button on mobile devices. + // This allows user to click the video area to toggle play/pause state. + if (event->type() == eventNames().clickEvent) + togglePlayState(); +#endif HTMLElement::defaultEventHandler(event); #endif } |