Title: [183953] trunk/Source/WebCore
- Revision
- 183953
- Author
- [email protected]
- Date
- 2015-05-07 15:25:36 -0700 (Thu, 07 May 2015)
Log Message
Media Controls: Scrubber should be independent of actual video time, causes scrubber to be jumpy.
https://bugs.webkit.org/show_bug.cgi?id=144700.
<rdar://problem/19997548>
Reviewed by Jer Noble.
Update time and timeline during the timeline input event instead of the wrapper's mousemove.
(Controller.prototype.handleWrapperMouseMove):
(Controller.prototype.handleTimelineMouseMove):
(Controller.prototype.drawTimelineBackground):
(Controller.prototype.updateControlsWhileScrubbing):
Updates time and scrubber to reflect timeline user input.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (183952 => 183953)
--- trunk/Source/WebCore/ChangeLog 2015-05-07 22:23:05 UTC (rev 183952)
+++ trunk/Source/WebCore/ChangeLog 2015-05-07 22:25:36 UTC (rev 183953)
@@ -1,3 +1,19 @@
+2015-05-06 Roger Fong <[email protected]>
+
+ Media Controls: Scrubber should be independent of actual video time, causes scrubber to be jumpy.
+ https://bugs.webkit.org/show_bug.cgi?id=144700.
+ <rdar://problem/19997548>
+
+ Reviewed by Jer Noble.
+
+ Update time and timeline during the timeline input event instead of the wrapper's mousemove.
+ (Controller.prototype.handleWrapperMouseMove):
+ (Controller.prototype.handleTimelineMouseMove):
+ (Controller.prototype.drawTimelineBackground):
+
+ (Controller.prototype.updateControlsWhileScrubbing):
+ Updates time and scrubber to reflect timeline user input.
+
2015-05-07 Yoav Weiss <[email protected]>
Handle meta viewport in HTMLPreloadScanner
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (183952 => 183953)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2015-05-07 22:23:05 UTC (rev 183952)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2015-05-07 22:25:36 UTC (rev 183953)
@@ -762,9 +762,6 @@
if (this.controlsAreHidden())
this.showControls();
this.resetHideControlsTimer();
-
- if (this.scrubbing)
- this.updateTime();
if (!this.isDragging)
return;
@@ -855,6 +852,7 @@
handleTimelineInput: function(event)
{
this.video.fastSeek(this.controls.timeline.value);
+ this.updateControlsWhileScrubbing();
},
handleTimelineChange: function(event)
@@ -1157,8 +1155,8 @@
if (!width || !height)
return;
-
- var played = this.video.currentTime / this.video.duration;
+
+ var played = this.controls.timeline.value / this.controls.timeline.max;
var buffered = 0;
for (var i = 0, end = this.video.buffered.length; i < end; ++i)
buffered = Math.max(this.video.buffered.end(i), buffered);
@@ -1408,7 +1406,19 @@
this.controls.timeline.value = this.video.currentTime;
this.controls.remainingTime.innerText = this.formatTime(timeRemaining);
},
+
+ updateControlsWhileScrubbing: function()
+ {
+ if (!this.scrubbing)
+ return;
+ var currentTime = (this.controls.timeline.value / this.controls.timeline.max) * this.video.duration;
+ var timeRemaining = currentTime - this.video.duration;
+ this.controls.currentTime.innerText = this.formatTime(currentTime);
+ this.controls.remainingTime.innerText = this.formatTime(timeRemaining);
+ this.drawTimelineBackground();
+ },
+
updateReadyState: function()
{
this.updateStatusDisplay();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes