Title: [282989] branches/safari-612-branch/Source/WebCore
Revision
282989
Author
[email protected]
Date
2021-09-23 13:13:38 -0700 (Thu, 23 Sep 2021)

Log Message

Cherry-pick r281288. rdar://problem/83460795

    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]):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281288 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-612-branch/Source/WebCore/ChangeLog (282988 => 282989)


--- branches/safari-612-branch/Source/WebCore/ChangeLog	2021-09-23 20:05:18 UTC (rev 282988)
+++ branches/safari-612-branch/Source/WebCore/ChangeLog	2021-09-23 20:13:38 UTC (rev 282989)
@@ -1,3 +1,58 @@
+2021-09-23  Russell Epstein  <[email protected]>
+
+        Cherry-pick r281288. rdar://problem/83460795
+
+    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]):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-09-23  Alan Coon  <[email protected]>
 
         Cherry-pick r282865. rdar://problem/83429816

Modified: branches/safari-612-branch/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm (282988 => 282989)


--- branches/safari-612-branch/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm	2021-09-23 20:05:18 UTC (rev 282988)
+++ branches/safari-612-branch/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm	2021-09-23 20:13:38 UTC (rev 282989)
@@ -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