Title: [238952] trunk/Source/WebCore
Revision
238952
Author
[email protected]
Date
2018-12-07 10:08:24 -0800 (Fri, 07 Dec 2018)

Log Message

[iOS] Don't update AVPlayerViewController currentTime while scrubbing
https://bugs.webkit.org/show_bug.cgi?id=192438
<rdar://problem/42977046>

Reviewed by Jer Noble.

No new tests, tested manually.

* platform/ios/PlaybackSessionInterfaceAVKit.mm:
(WebCore::PlaybackSessionInterfaceAVKit::currentTimeChanged): Don't report change during scrubbing.

* platform/ios/WebAVPlayerController.h:
* platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController beginScrubbing:]): Set _isScrubbing.
(-[WebAVPlayerController endScrubbing:]): Ditto.
(-[WebAVPlayerController isScrubbing]): Return _isScrubbing.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (238951 => 238952)


--- trunk/Source/WebCore/ChangeLog	2018-12-07 10:48:56 UTC (rev 238951)
+++ trunk/Source/WebCore/ChangeLog	2018-12-07 18:08:24 UTC (rev 238952)
@@ -1,3 +1,22 @@
+2018-12-07  Eric Carlson  <[email protected]>
+
+        [iOS] Don't update AVPlayerViewController currentTime while scrubbing
+        https://bugs.webkit.org/show_bug.cgi?id=192438
+        <rdar://problem/42977046>
+
+        Reviewed by Jer Noble.
+
+        No new tests, tested manually.
+
+        * platform/ios/PlaybackSessionInterfaceAVKit.mm:
+        (WebCore::PlaybackSessionInterfaceAVKit::currentTimeChanged): Don't report change during scrubbing.
+
+        * platform/ios/WebAVPlayerController.h:
+        * platform/ios/WebAVPlayerController.mm:
+        (-[WebAVPlayerController beginScrubbing:]): Set _isScrubbing.
+        (-[WebAVPlayerController endScrubbing:]): Ditto.
+        (-[WebAVPlayerController isScrubbing]): Return _isScrubbing.
+
 2018-12-07  Thibault Saunier  <[email protected]>
 
         [WPE][GTK] Implement WebAudioSourceProviderGStreamer to allow bridging MediaStream and the WebAudio APIs

Modified: trunk/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm (238951 => 238952)


--- trunk/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm	2018-12-07 10:48:56 UTC (rev 238951)
+++ trunk/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm	2018-12-07 18:08:24 UTC (rev 238952)
@@ -95,6 +95,9 @@
 
 void PlaybackSessionInterfaceAVKit::currentTimeChanged(double currentTime, double anchorTime)
 {
+    if ([m_playerController isScrubbing])
+        return;
+
     NSTimeInterval anchorTimeStamp = ![m_playerController rate] ? NAN : anchorTime;
     AVValueTiming *timing = [getAVValueTimingClass() valueTimingWithAnchorValue:currentTime
         anchorTimeStamp:anchorTimeStamp rate:0];

Modified: trunk/Source/WebCore/platform/ios/WebAVPlayerController.h (238951 => 238952)


--- trunk/Source/WebCore/platform/ios/WebAVPlayerController.h	2018-12-07 10:48:56 UTC (rev 238951)
+++ trunk/Source/WebCore/platform/ios/WebAVPlayerController.h	2018-12-07 18:08:24 UTC (rev 238952)
@@ -51,6 +51,7 @@
 @property BOOL canScanBackward;
 @property (readonly) BOOL canSeekToBeginning;
 @property (readonly) BOOL canSeekToEnd;
+@property (readonly) BOOL isScrubbing;
 
 @property BOOL canPlay;
 @property (getter=isPlaying) BOOL playing;

Modified: trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm (238951 => 238952)


--- trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm	2018-12-07 10:48:56 UTC (rev 238951)
+++ trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm	2018-12-07 18:08:24 UTC (rev 238952)
@@ -56,6 +56,7 @@
 
 @implementation WebAVPlayerController {
     BOOL _liveStreamEventModePossible;
+    BOOL _isScrubbing;
 }
 
 - (instancetype)init
@@ -157,6 +158,7 @@
 - (void)beginScrubbing:(id)sender
 {
     UNUSED_PARAM(sender);
+    _isScrubbing = YES;
     if (self.delegate)
         self.delegate->beginScrubbing();
 }
@@ -164,6 +166,7 @@
 - (void)endScrubbing:(id)sender
 {
     UNUSED_PARAM(sender);
+    _isScrubbing = NO;
     if (self.delegate)
         self.delegate->endScrubbing();
 }
@@ -288,6 +291,11 @@
         [self seekToTime:timeAtEndOfSeekableTimeRanges];
 }
 
+- (BOOL)isScrubbing
+{
+    return _isScrubbing;
+}
+
 - (BOOL)canScanForward
 {
     return [self canPlay];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to