Title: [277322] trunk/Source/WebCore
- Revision
- 277322
- Author
- [email protected]
- Date
- 2021-05-11 06:42:18 -0700 (Tue, 11 May 2021)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (277321 => 277322)
--- trunk/Source/WebCore/ChangeLog 2021-05-11 12:49:46 UTC (rev 277321)
+++ trunk/Source/WebCore/ChangeLog 2021-05-11 13:42:18 UTC (rev 277322)
@@ -1,3 +1,14 @@
+2021-05-11 Jean-Yves Avenard <[email protected]>
+
+ 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.
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+ tells whether the AVSBAR is attached to an <audio> or <video> element.
+
2021-05-11 Cathie Chen <[email protected]>
[CSS contain] Support contain:size
Modified: trunk/Source/WebCore/PAL/ChangeLog (277321 => 277322)
--- trunk/Source/WebCore/PAL/ChangeLog 2021-05-11 12:49:46 UTC (rev 277321)
+++ trunk/Source/WebCore/PAL/ChangeLog 2021-05-11 13:42:18 UTC (rev 277322)
@@ -1,3 +1,14 @@
+2021-05-11 Jean-Yves Avenard <[email protected]>
+
+ 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.
+
+ * pal/spi/cocoa/AVFoundationSPI.h: Add forward declaration for new methods
+ while this isn't in SDK yet.
+
2021-05-10 Wenson Hsieh <[email protected]>
[macOS] Allow immediate action gestures to begin when force clicking text inside image overlays
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h (277321 => 277322)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h 2021-05-11 12:49:46 UTC (rev 277321)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h 2021-05-11 13:42:18 UTC (rev 277322)
@@ -338,6 +338,11 @@
#if __has_include(<AVFoundation/AVSampleBufferAudioRenderer.h>)
#import <AVFoundation/AVSampleBufferAudioRenderer.h>
+NS_ASSUME_NONNULL_BEGIN
+@interface AVSampleBufferAudioRenderer (AVSampleBufferAudioRendererWebKitOnly)
+- (void)setIsUnaccompaniedByVisuals:(BOOL)audioOnly SPI_AVAILABLE(macos(12.0)) API_UNAVAILABLE(ios, tvos, watchos);
+@end
+NS_ASSUME_NONNULL_END
#else
NS_ASSUME_NONNULL_BEGIN
@@ -352,6 +357,7 @@
- (void)stopRequestingMediaData;
- (void)setVolume:(float)volume;
- (void)setMuted:(BOOL)muted;
+- (void)setIsUnaccompaniedByVisuals:(BOOL)audioOnly;
@property (nonatomic, copy) NSString *audioTimePitchAlgorithm;
@end
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (277321 => 277322)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2021-05-11 12:49:46 UTC (rev 277321)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2021-05-11 13:42:18 UTC (rev 277322)
@@ -1169,6 +1169,10 @@
[audioRenderer setMuted:m_player->muted()];
[audioRenderer setVolume:m_player->volume()];
[audioRenderer setAudioTimePitchAlgorithm:(m_player->preservesPitch() ? AVAudioTimePitchAlgorithmSpectral : AVAudioTimePitchAlgorithmVarispeed)];
+ ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
+ if ([audioRenderer respondsToSelector:@selector(setIsUnaccompaniedByVisuals:)])
+ [audioRenderer setIsUnaccompaniedByVisuals:!m_player->isVideoPlayer()];
+ ALLOW_NEW_API_WITHOUT_GUARDS_END
#if HAVE(AUDIO_OUTPUT_DEVICE_UNIQUE_ID)
auto deviceId = m_player->audioOutputDeviceIdOverride();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes