Title: [281288] trunk/Source/WebCore
Revision
281288
Author
[email protected]
Date
2021-08-19 18:41:03 -0700 (Thu, 19 Aug 2021)

Log Message

Touchbar not showing time scrubbing
https://bugs.webkit.org/show_bug.cgi?id=229269
rdar://81349236

Reviewed by Jer Noble.

AVKit uses canSeek to determine when to show the time scrubber
in the touch bar. This was a synthesized method determined on weither the video
is seekable and has a seekable range set.
Should the value of either boolean change which would impact the final value of
[AVTouchBarPlaybackControlsControlling canSeek] , no observers would be called.
Add the appropriate obj-c methods to explicitly set a dependency between properties
willChange/didChange.
Been unable to reproduce the problem programatically, the issue is highly timing
dependent.
An API test will be added with https://bugs.webkit.org/show_bug.cgi?id=229286.

* platform/mac/WebPlaybackControlsManager.mm:
(+[WebPlaybackControlsManager keyPathsForValuesAffectingCanSeek]):
(+[WebPlaybackControlsManager keyPathsForValuesAffectingContentDuration]):
(-[WebPlaybackControlsManager setSeekableTimeRanges:]):
(+[WebPlaybackControlsManager keyPathsForValuesAffectingValueCanBeginTouchBarScrubbing]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (281287 => 281288)


--- trunk/Source/WebCore/ChangeLog	2021-08-20 01:12:25 UTC (rev 281287)
+++ trunk/Source/WebCore/ChangeLog	2021-08-20 01:41:03 UTC (rev 281288)
@@ -1,3 +1,28 @@
+2021-08-19  Jean-Yves Avenard  <[email protected]>
+
+        Touchbar not showing time scrubbing
+        https://bugs.webkit.org/show_bug.cgi?id=229269
+        rdar://81349236
+
+        Reviewed by Jer Noble.
+
+        AVKit uses canSeek to determine when to show the time scrubber
+        in the touch bar. This was a synthesized method determined on weither the video
+        is seekable and has a seekable range set.
+        Should the value of either boolean change which would impact the final value of
+        [AVTouchBarPlaybackControlsControlling canSeek] , no observers would be called.
+        Add the appropriate obj-c methods to explicitly set a dependency between properties
+        willChange/didChange.
+        Been unable to reproduce the problem programatically, the issue is highly timing
+        dependent.
+        An API test will be added with https://bugs.webkit.org/show_bug.cgi?id=229286.
+
+        * platform/mac/WebPlaybackControlsManager.mm:
+        (+[WebPlaybackControlsManager keyPathsForValuesAffectingCanSeek]):
+        (+[WebPlaybackControlsManager keyPathsForValuesAffectingContentDuration]):
+        (-[WebPlaybackControlsManager setSeekableTimeRanges:]):
+        (+[WebPlaybackControlsManager keyPathsForValuesAffectingValueCanBeginTouchBarScrubbing]):
+
 2021-08-19  Alan Bujtas  <[email protected]>
 
         [LFC][IFC] Remove redundant inlineBoxEndSet in InlineFormattingContext::computeGeometryForLineContent

Modified: trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm (281287 => 281288)


--- trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm	2021-08-20 01:12:25 UTC (rev 281287)
+++ trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm	2021-08-20 01:41:03 UTC (rev 281288)
@@ -61,6 +61,16 @@
     [super dealloc];
 }
 
++ (NSSet<NSString *> *)keyPathsForValuesAffectingCanSeek
+{
+    return [NSSet setWithObject:@"seekableTimeRanges"];
+}
+
++ (NSSet<NSString *> *)keyPathsForValuesAffectingContentDuration
+{
+    return [NSSet setWithObject:@"seekableTimeRanges"];
+}
+
 - (NSTimeInterval)contentDuration
 {
     return [_seekableTimeRanges count] ? _contentDuration : std::numeric_limits<double>::infinity();
@@ -89,7 +99,6 @@
 - (void)setSeekableTimeRanges:(NSArray *)timeRanges
 {
     _seekableTimeRanges = timeRanges;
-
     _canSeek = timeRanges.count;
 }
 
@@ -125,6 +134,11 @@
     completionHandler(@[ ]);
 }
 
++ (NSSet<NSString *> *)keyPathsForValuesAffectingValueCanBeginTouchBarScrubbing
+{
+    return [NSSet setWithObjects:@"canSeek", "contentDuration", nil];
+}
+
 - (BOOL)canBeginTouchBarScrubbing
 {
     // At this time, we return YES for all media that is not a live stream and media that is not Netflix. (A Netflix
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to