[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 0de7ca7..be5bfce 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 7eb9371..614c6dc 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 69d726b..9a4bbe5 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;
     },