[iOS] update control type when playback state changes
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Jul 2014 22:14:44 +0000 (22:14 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Jul 2014 22:14:44 +0000 (22:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=134856

Reviewed by Dean Jackson.

Check to make sure the correct type of media controls are showing when playback state
changes so we don't end up with the wrong type of controls during playback.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.HandledVideoEvents): Drive-by fix, call handlePlay on 'playing' instead
    of 'play' so controls don't hide too early.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.setPlaying): New, call updateControls to make sure inline
    controls are shown when appropriate.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171032 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js

index 0de7ca72b513d59eb4a6b9c72d0958434e5d1591..be5bfcebbe945f9a8a19ef33dcaf7d84e9195155 100644 (file)
@@ -1,3 +1,20 @@
+2014-07-12  Eric Carlson  <eric.carlson@apple.com>
+
+        [iOS] update control type when playback state changes
+        https://bugs.webkit.org/show_bug.cgi?id=134856
+
+        Reviewed by Dean Jackson.
+
+        Check to make sure the correct type of media controls are showing when playback state
+        changes so we don't end up with the wrong type of controls during playback.
+
+        * Modules/mediacontrols/mediaControlsApple.js: 
+        (Controller.prototype.HandledVideoEvents): Drive-by fix, call handlePlay on 'playing' instead
+            of 'play' so controls don't hide too early.
+        * Modules/mediacontrols/mediaControlsiOS.js:
+        (ControllerIOS.prototype.setPlaying): New, call updateControls to make sure inline
+            controls are shown when appropriate.
+
 2014-07-12  Dean Jackson  <dino@apple.com>
 
         [iOS Media] Start playback button should indicate when it can't play
index 7eb937172defbc9111122a6da53bcd67cadb4b6f..614c6dcf40414f3e9cf55dcd92a31af29386cd20 100644 (file)
@@ -58,7 +58,7 @@ Controller.prototype = {
         canplaythrough: 'handleReadyStateChange',
         timeupdate: 'handleTimeUpdate',
         durationchange: 'handleDurationChange',
-        play: 'handlePlay',
+        playing: 'handlePlay',
         pause: 'handlePause',
         progress: 'handleProgress',
         volumechange: 'handleVolumeChange',
index 69d726bfd9c14d1711f8948c6aeb1ecdf25c926d..9a4bbe5e47475e943aa8c6e4e8183a9606c3cff3 100644 (file)
@@ -439,6 +439,12 @@ ControllerIOS.prototype = {
         Controller.prototype.updateStatusDisplay.call(this, event);
     },
 
+    setPlaying: function(isPlaying)
+    {
+        this.updateControls();
+        Controller.prototype.setPlaying.call(this, isPlaying);
+    },
+
     get pageScaleFactor() {
         return this._pageScaleFactor;
     },