Changeset 183965 in webkit
- Timestamp:
- May 7, 2015, 5:45:00 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Modules/mediacontrols/mediaControlsiOS.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r183960 r183965 1 2015-05-07 Dean Jackson <dino@apple.com> 2 3 [iOS] While scrubbing and holding down, video continues to play 4 https://bugs.webkit.org/show_bug.cgi?id=144776 5 <rdar://problem/20863757> 6 7 Reviewed by Simon Fraser. 8 9 When we are scrubbing a video, we should pause playback. As we 10 let go of the scrubber playback can resume (but only if it was 11 playing originally). 12 13 * Modules/mediacontrols/mediaControlsiOS.js: 14 (ControllerIOS.prototype.createControls): Listen for touchstart on the scrubber. 15 (ControllerIOS.prototype.handleTimelineInput): Call the prototype, but pause if necessary. 16 (ControllerIOS.prototype.handleTimelineChange): Just moved this to be with the other timeline functions. 17 (ControllerIOS.prototype.handleTimelineTouchStart): Add the listeners for end and cancel. Remember that we are 18 potentially about to scrub. 19 (ControllerIOS.prototype.handleTimelineTouchEnd): Remove the listeners. 20 1 21 2015-05-07 Said Abou-Hallawa <sabouhallawa@apple.com> 2 22 -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js
r183797 r183965 146 146 this.listenFor(this.controls.optimizedFullscreenButton, 'touchend', this.handleOptimizedFullscreenTouchEnd); 147 147 this.listenFor(this.controls.optimizedFullscreenButton, 'touchcancel', this.handleOptimizedFullscreenTouchCancel); 148 this.listenFor(this.controls.timeline, 'touchstart', this.handleTimelineTouchStart); 148 149 this.stopListeningFor(this.controls.playButton, 'click', this.handlePlayButtonClicked); 149 150 … … 304 305 }, 305 306 306 handleTimelineChange: function(event) {307 Controller.prototype.handleTimelineChange.call(this);308 this.updateProgress();309 },310 311 307 handlePlayButtonTouchStart: function() { 312 308 this.controls.playButton.classList.add('active'); … … 495 491 this.controls.startPlaybackButton.classList.remove('active'); 496 492 return true; 493 }, 494 495 handleTimelineInput: function(event) { 496 if (this.potentiallyScrubbing) 497 this.video.pause(); 498 Controller.prototype.handleTimelineInput.call(this, event); 499 }, 500 501 handleTimelineChange: function(event) { 502 Controller.prototype.handleTimelineChange.call(this, event); 503 this.updateProgress(); 504 }, 505 506 handleTimelineTouchStart: function(event) { 507 this.potentiallyScrubbing = true; 508 this.wasPlayingWhenScrubbingStarted = !this.video.paused; 509 this.listenFor(this.controls.timeline, 'touchend', this.handleTimelineTouchEnd); 510 this.listenFor(this.controls.timeline, 'touchcancel', this.handleTimelineTouchEnd); 511 }, 512 513 handleTimelineTouchEnd: function(event) { 514 this.stopListeningFor(this.controls.timeline, 'touchend', this.handleTimelineTouchEnd); 515 this.stopListeningFor(this.controls.timeline, 'touchcancel', this.handleTimelineTouchEnd); 516 this.potentiallyScrubbing = false; 517 if (this.wasPlayingWhenScrubbingStarted && this.video.paused) 518 this.video.play(); 497 519 }, 498 520
Note:
See TracChangeset
for help on using the changeset viewer.