Changeset 180024 in webkit


Ignore:
Timestamp:
Feb 12, 2015, 5:04:12 PM (11 years ago)
Author:
dino@apple.com
Message:

[iOS Media] Audio should hide timeline scrubber until playback starts
https://bugs.webkit.org/show_bug.cgi?id=141542
<rdar://problem/19820685>

Reviewed by Eric Carlson.

We regressed from the system behaviour in iOS 7, where the timeline
scrubber for an audio element is not shown until the user starts
playback.

  • Modules/mediacontrols/mediaControlsiOS.css:

(video::-webkit-media-controls-panel): Fix the alignment of the flexbox.
(audio::-webkit-media-controls-status-display): Add the style for the status display.

  • Modules/mediacontrols/mediaControlsiOS.js:

(ControllerIOS.prototype.configureInlineControls): Start hidden if we are an <audio>.
(ControllerIOS.prototype.configureFullScreenControls): Drive by comment change.
(ControllerIOS.prototype.setPlaying): Unhide the timeline.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r180020 r180024  
     12015-02-12  Dean Jackson  <dino@apple.com>
     2
     3        [iOS Media] Audio should hide timeline scrubber until playback starts
     4        https://bugs.webkit.org/show_bug.cgi?id=141542
     5        <rdar://problem/19820685>
     6
     7        Reviewed by Eric Carlson.
     8
     9        We regressed from the system behaviour in iOS 7, where the timeline
     10        scrubber for an audio element is not shown until the user starts
     11        playback.
     12
     13        * Modules/mediacontrols/mediaControlsiOS.css:
     14        (video::-webkit-media-controls-panel): Fix the alignment of the flexbox.
     15        (audio::-webkit-media-controls-status-display): Add the style for the status display.
     16        * Modules/mediacontrols/mediaControlsiOS.js:
     17        (ControllerIOS.prototype.configureInlineControls): Start hidden if we are an <audio>.
     18        (ControllerIOS.prototype.configureFullScreenControls): Drive by comment change.
     19        (ControllerIOS.prototype.setPlaying): Unhide the timeline.
     20
    1212015-02-12  Chris Dumez  <cdumez@apple.com>
    222
  • trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css

    r180013 r180024  
    112112    -webkit-flex-direction: row;
    113113    -webkit-flex-wrap: nowrap;
    114     -webkit-justify-content: space-between;
     114    -webkit-justify-content: flex-start;
    115115    -webkit-align-items: center;
    116116
     
    411411}
    412412
     413/* ================== STATUS DISPLAY ====================== */
     414
     415video::-webkit-media-controls-status-display,
     416audio::-webkit-media-controls-status-display {
     417
     418    overflow: hidden;
     419    font-family: -apple-system-font;
     420    letter-spacing: normal;
     421    word-spacing: normal;
     422    line-height: normal;
     423    text-transform: none;
     424    text-indent: 0px;
     425    text-decoration: none;
     426    color: black;
     427    mix-blend-mode: plus-darker;
     428    opacity: 0.55;
     429    -webkit-order: 2;
     430}
     431
     432/* ================== CAPTIONS ====================== */
     433
    413434video::-webkit-media-text-track-container {
    414435    position: relative;
  • trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js

    r180013 r180024  
    229229            this.controls.timelineBox.appendChild(this.controls.remainingTime);
    230230        }
    231         if (!this.isAudio()) {
     231        if (this.isAudio()) {
     232            // Hide the scrubber on audio until the user starts playing.
     233            this.controls.timelineBox.classList.add(this.ClassNames.hidden);
     234        } else {
    232235            if (ControllerIOS.gSimulateOptimizedFullscreenAvailable || ('webkitSupportsPresentationMode' in this.video && this.video.webkitSupportsPresentationMode('optimized')))
    233236                this.controls.panel.appendChild(this.controls.optimizedFullscreenButton);
     
    237240
    238241    configureFullScreenControls: function() {
    239         // Do nothing
     242        // Explicitly do nothing to override base-class behavior.
    240243    },
    241244
     
    602605    {
    603606        Controller.prototype.setPlaying.call(this, isPlaying);
     607        if (isPlaying && this.isAudio())
     608            this.controls.timelineBox.classList.remove(this.ClassNames.hidden);
    604609        this.updateControls();
    605610    },
Note: See TracChangeset for help on using the changeset viewer.