Changeset 176139 in webkit


Ignore:
Timestamp:
Nov 14, 2014 1:55:40 PM (10 years ago)
Author:
dino@apple.com
Message:

[Media] Timeline scrubber not updating as the video plays
https://bugs.webkit.org/show_bug.cgi?id=138717
<rdar://problem/18957509>

Reviewed by Jer Noble.

Source/WebCore:

There is some confusing logic that determines
whether or not the controls are hidden, and a
slight error caused timelines to not advance unless
they were explicitly showing.

The fix was to be a bit more liberal in deciding
when the controls are showing, but still cautious
enough to stop up causing repaints when things
are hidden.

Test: media/media-controls-timeline-updates.html

  • Modules/mediacontrols/mediaControlsApple.js:

(Controller.prototype.controlsAreHidden): We only need
to check if we're an audio element or explicitly
hidden.
(Controller.prototype.showControls): Explicitly call
updateTime.

LayoutTests:

Tests that an inline video will actually advance the
timeline scrubber if it plays momentarily.

Eric wrote all the hard bits here. I just changed
a few lines to test if the timeline had moved from 0.
Unfortunately we can't rely on the timeline value
being identical to the currentTime of the media element,
because we only move the timeline when we get events.

  • media/media-controls-timeline-updates.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r176128 r176139  
     12014-11-14  Dean Jackson  <dino@apple.com>
     2
     3        [Media] Timeline scrubber not updating as the video plays
     4        https://bugs.webkit.org/show_bug.cgi?id=138717
     5        <rdar://problem/18957509>
     6
     7        Reviewed by Jer Noble.
     8
     9        Tests that an inline video will actually advance the
     10        timeline scrubber if it plays momentarily.
     11
     12        Eric wrote all the hard bits here. I just changed
     13        a few lines to test if the timeline had moved from 0.
     14        Unfortunately we can't rely on the timeline value
     15        being identical to the currentTime of the media element,
     16        because we only move the timeline when we get events.
     17
     18        * media/media-controls-timeline-updates.html: Added.
     19
    1202014-11-14  Myles C. Maxfield  <mmaxfield@apple.com>
    221
  • trunk/Source/WebCore/ChangeLog

    r176137 r176139  
     12014-11-14  Dean Jackson  <dino@apple.com>
     2
     3        [Media] Timeline scrubber not updating as the video plays
     4        https://bugs.webkit.org/show_bug.cgi?id=138717
     5        <rdar://problem/18957509>
     6
     7        Reviewed by Jer Noble.
     8
     9        There is some confusing logic that determines
     10        whether or not the controls are hidden, and a
     11        slight error caused timelines to not advance unless
     12        they were explicitly showing.
     13
     14        The fix was to be a bit more liberal in deciding
     15        when the controls are showing, but still cautious
     16        enough to stop up causing repaints when things
     17        are hidden.
     18
     19        Test: media/media-controls-timeline-updates.html
     20
     21        * Modules/mediacontrols/mediaControlsApple.js:
     22        (Controller.prototype.controlsAreHidden): We only need
     23        to check if we're an audio element or explicitly
     24        hidden.
     25        (Controller.prototype.showControls): Explicitly call
     26        updateTime.
     27
    1282014-11-14  Tim Horton  <timothy_horton@apple.com>
    229
  • trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js

    r176090 r176139  
    10361036    showControls: function()
    10371037    {
     1038        this.setNeedsTimelineMetricsUpdate();
     1039
     1040        this.updateTime();
     1041        this.updateProgress(true);
     1042
    10381043        this.controls.panel.classList.add(this.ClassNames.show);
    10391044        this.controls.panel.classList.remove(this.ClassNames.hidden);
    1040 
    1041         this.setNeedsTimelineMetricsUpdate();
    10421045    },
    10431046
     
    10491052    controlsAreHidden: function()
    10501053    {
    1051         return !this.isAudio() && (!this.controls.panel.classList.contains(this.ClassNames.show) || this.controls.panel.classList.contains(this.ClassNames.hidden));
     1054        return !this.isAudio() && this.controls.panel.classList.contains(this.ClassNames.hidden);
    10521055    },
    10531056
Note: See TracChangeset for help on using the changeset viewer.