Changeset 275100 in webkit


Ignore:
Timestamp:
Mar 26, 2021, 8:58:17 AM (4 years ago)
Author:
Devin Rousso
Message:

Adopt AVKit SPI for hiding touch bar seeking controls
https://bugs.webkit.org/show_bug.cgi?id=223773
<rdar://problem/68937617>

Reviewed by Jer Noble.

Source/WebCore:

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager setSeekableTimeRanges:]):
(-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):
If the list of seekable time ranges is empty, we are unable to seek.

Source/WebCore/PAL:

  • pal/spi/cocoa/AVKitSPI.h:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r275097 r275100  
     12021-03-26  Devin Rousso  <drousso@apple.com>
     2
     3        Adopt AVKit SPI for hiding touch bar seeking controls
     4        https://bugs.webkit.org/show_bug.cgi?id=223773
     5        <rdar://problem/68937617>
     6
     7        Reviewed by Jer Noble.
     8
     9        * platform/mac/WebPlaybackControlsManager.h:
     10        * platform/mac/WebPlaybackControlsManager.mm:
     11        (-[WebPlaybackControlsManager setSeekableTimeRanges:]):
     12        (-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):
     13        If the list of seekable time ranges is empty, we are unable to seek.
     14
    1152021-03-26  Kimmo Kinnunen  <kkinnunen@apple.com>
    216
  • trunk/Source/WebCore/PAL/ChangeLog

    r275082 r275100  
     12021-03-26  Devin Rousso  <drousso@apple.com>
     2
     3        Adopt AVKit SPI for hiding touch bar seeking controls
     4        https://bugs.webkit.org/show_bug.cgi?id=223773
     5        <rdar://problem/68937617>
     6
     7        Reviewed by Jer Noble.
     8
     9        * pal/spi/cocoa/AVKitSPI.h:
     10
    1112021-03-26  Jessie Berlin  <jberlin@webkit.org>
    212
  • trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h

    r274249 r275100  
    330330@property (readonly) BOOL canTogglePictureInPicture;
    331331- (void)togglePictureInPicture;
     332@property (nonatomic, readonly) BOOL canSeek;
    332333
    333334typedef NS_ENUM(NSInteger, AVTouchBarMediaSelectionOptionType) {
  • trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h

    r274249 r275100  
    5757    BOOL _hasEnabledVideo;
    5858    BOOL _canTogglePlayback;
     59    BOOL _canSeek;
    5960}
    6061
     
    7475@property BOOL canTogglePictureInPicture;
    7576- (void)togglePictureInPicture;
     77@property (nonatomic, readonly) BOOL canSeek;
    7678
    7779- (AVTouchBarMediaSelectionOption *)currentAudioTouchBarMediaSelectionOption;
  • trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm

    r274249 r275100  
    5555@synthesize pictureInPictureActive;
    5656@synthesize canTogglePictureInPicture;
     57@synthesize canSeek = _canSeek;
    5758
    5859- (void)dealloc
     
    9192{
    9293    _seekableTimeRanges = timeRanges;
     94
     95    _canSeek = timeRanges.count;
    9396}
    9497
     
    131134    // other media. The intent of the API is that we return NO when the media is being scrubbed via the on-screen scrubber.
    132135    // But we can only possibly get the right answer for media that uses the default controls.
    133     return std::isfinite(_contentDuration) && [_seekableTimeRanges count];
     136    return _canSeek && std::isfinite(_contentDuration);
    134137}
    135138
Note: See TracChangeset for help on using the changeset viewer.