⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 183971 in webkit


Ignore:
Timestamp:
May 7, 2015, 6:55:08 PM (11 years ago)
Author:
dino@apple.com
Message:

[iOS] MediaControls: disappear while scrubbing
https://bugs.webkit.org/show_bug.cgi?id=144777
<rdar://problem/20065572>

Reviewed by Eric Carlson.

If we are scrubbing we shouldn't hide the controls.

  • Modules/mediacontrols/mediaControlsApple.js:

(Controller.prototype.hideControls): Return early if we are scrubbing.

  • Modules/mediacontrols/mediaControlsiOS.js:

(ControllerIOS.prototype): Add initial value for _potentiallyScrubbing and
rename from non-underscored value throughout the file.
(ControllerIOS.prototype.handleTimelineTouchEnd): When we finish scrubbing, reset
the timer to hide the controls.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r183970 r183971  
     12015-05-07  Dean Jackson  <dino@apple.com>
     2
     3        [iOS] MediaControls: disappear while scrubbing
     4        https://bugs.webkit.org/show_bug.cgi?id=144777
     5        <rdar://problem/20065572>
     6
     7        Reviewed by Eric Carlson.
     8
     9        If we are scrubbing we shouldn't hide the controls.
     10
     11        * Modules/mediacontrols/mediaControlsApple.js:
     12        (Controller.prototype.hideControls): Return early if we are scrubbing.
     13        * Modules/mediacontrols/mediaControlsiOS.js:
     14        (ControllerIOS.prototype): Add initial value for _potentiallyScrubbing and
     15        rename from non-underscored value throughout the file.
     16        (ControllerIOS.prototype.handleTimelineTouchEnd): When we finish scrubbing, reset
     17        the timer to hide the controls.
     18
    1192015-05-07  Simon Fraser  <simon.fraser@apple.com>
    220
  • trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js

    r183953 r183971  
    13631363    hideControls: function()
    13641364    {
    1365         if (this.controlsAlwaysVisible())
     1365        if (this.controlsAlwaysVisible() || this._potentiallyScrubbing)
    13661366            return;
    13671367
  • trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js

    r183965 r183971  
    1717    this._timelineIsHidden = false;
    1818    this._currentDisplayWidth = 0;
     19    this._potentiallyScrubbing = false;
    1920    this.scheduleUpdateLayoutForDisplayedWidth();
    2021
     
    494495
    495496    handleTimelineInput: function(event) {
    496         if (this.potentiallyScrubbing)
     497        if (this._potentiallyScrubbing)
    497498            this.video.pause();
    498499        Controller.prototype.handleTimelineInput.call(this, event);
     
    505506
    506507    handleTimelineTouchStart: function(event) {
    507         this.potentiallyScrubbing = true;
     508        this._potentiallyScrubbing = true;
    508509        this.wasPlayingWhenScrubbingStarted = !this.video.paused;
    509510        this.listenFor(this.controls.timeline, 'touchend', this.handleTimelineTouchEnd);
     
    514515        this.stopListeningFor(this.controls.timeline, 'touchend', this.handleTimelineTouchEnd);
    515516        this.stopListeningFor(this.controls.timeline, 'touchcancel', this.handleTimelineTouchEnd);
    516         this.potentiallyScrubbing = false;
    517         if (this.wasPlayingWhenScrubbingStarted && this.video.paused)
     517        this._potentiallyScrubbing = false;
     518        if (this.wasPlayingWhenScrubbingStarted && this.video.paused) {
    518519            this.video.play();
     520            this.resetHideControlsTimer();
     521        }
    519522    },
    520523
Note: See TracChangeset for help on using the changeset viewer.