⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 277322 in webkit


Ignore:
Timestamp:
May 11, 2021, 6:42:18 AM (5 years ago)
Author:
Jean-Yves Avenard
Message:

Adopt CoreMedia SPI to identify audio-only playback for MSE clients
https://bugs.webkit.org/show_bug.cgi?id=225647
rdar://76138365

Reviewed by Youenn Fablet.

Source/WebCore:

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: tells whether the AVSBAR is attached to an <audio> or <video> element.

Source/WebCore/PAL:

  • pal/spi/cocoa/AVFoundationSPI.h: Add forward declaration for new methods while this isn't in SDK yet.
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r277321 r277322  
     12021-05-11  Jean-Yves Avenard  <jya@apple.com>
     2
     3        Adopt CoreMedia SPI to identify audio-only playback for MSE clients
     4        https://bugs.webkit.org/show_bug.cgi?id=225647
     5        rdar://76138365
     6
     7        Reviewed by Youenn Fablet.
     8
     9        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
     10          tells whether the AVSBAR is attached to an <audio> or <video> element.
     11
    1122021-05-11  Cathie Chen  <cathiechen@igalia.com>
    213
  • trunk/Source/WebCore/PAL/ChangeLog

    r277316 r277322  
     12021-05-11  Jean-Yves Avenard  <jya@apple.com>
     2
     3        Adopt CoreMedia SPI to identify audio-only playback for MSE clients
     4        https://bugs.webkit.org/show_bug.cgi?id=225647
     5        rdar://76138365
     6
     7        Reviewed by Youenn Fablet.
     8
     9        * pal/spi/cocoa/AVFoundationSPI.h: Add forward declaration for new methods
     10          while this isn't in SDK yet.
     11
    1122021-05-10  Wenson Hsieh  <wenson_hsieh@apple.com>
    213
  • trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h

    r273730 r277322  
    339339#if __has_include(<AVFoundation/AVSampleBufferAudioRenderer.h>)
    340340#import <AVFoundation/AVSampleBufferAudioRenderer.h>
     341NS_ASSUME_NONNULL_BEGIN
     342@interface AVSampleBufferAudioRenderer (AVSampleBufferAudioRendererWebKitOnly)
     343- (void)setIsUnaccompaniedByVisuals:(BOOL)audioOnly SPI_AVAILABLE(macos(12.0)) API_UNAVAILABLE(ios, tvos, watchos);
     344@end
     345NS_ASSUME_NONNULL_END
    341346#else
    342347
     
    353358- (void)setVolume:(float)volume;
    354359- (void)setMuted:(BOOL)muted;
     360- (void)setIsUnaccompaniedByVisuals:(BOOL)audioOnly;
    355361@property (nonatomic, copy) NSString *audioTimePitchAlgorithm;
    356362@end
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm

    r277272 r277322  
    11701170    [audioRenderer setVolume:m_player->volume()];
    11711171    [audioRenderer setAudioTimePitchAlgorithm:(m_player->preservesPitch() ? AVAudioTimePitchAlgorithmSpectral : AVAudioTimePitchAlgorithmVarispeed)];
     1172    ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
     1173    if ([audioRenderer respondsToSelector:@selector(setIsUnaccompaniedByVisuals:)])
     1174        [audioRenderer setIsUnaccompaniedByVisuals:!m_player->isVideoPlayer()];
     1175    ALLOW_NEW_API_WITHOUT_GUARDS_END
    11721176
    11731177#if HAVE(AUDIO_OUTPUT_DEVICE_UNIQUE_ID)
Note: See TracChangeset for help on using the changeset viewer.