Title: [272188] trunk/Source
- Revision
- 272188
- Author
- [email protected]
- Date
- 2021-02-01 19:23:38 -0800 (Mon, 01 Feb 2021)
Log Message
[Cocoa] Disable interstitial events on AVPlayerItem.
https://bugs.webkit.org/show_bug.cgi?id=221215
Reviewed by Eric Carlson.
Source/WebCore:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
Source/WebCore/PAL:
* pal/spi/cocoa/AVFoundationSPI.h:
Source/WTF:
* wtf/PlatformHave.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (272187 => 272188)
--- trunk/Source/WTF/ChangeLog 2021-02-02 03:22:18 UTC (rev 272187)
+++ trunk/Source/WTF/ChangeLog 2021-02-02 03:23:38 UTC (rev 272188)
@@ -1,3 +1,12 @@
+2021-02-01 Jer Noble <[email protected]>
+
+ [Cocoa] Disable interstitial events on AVPlayerItem.
+ https://bugs.webkit.org/show_bug.cgi?id=221215
+
+ Reviewed by Eric Carlson.
+
+ * wtf/PlatformHave.h:
+
2021-02-01 Olivier Blin <[email protected]>
clang Linux build cannot link because of __builtin_mul_overflow
Modified: trunk/Source/WTF/wtf/PlatformHave.h (272187 => 272188)
--- trunk/Source/WTF/wtf/PlatformHave.h 2021-02-02 03:22:18 UTC (rev 272187)
+++ trunk/Source/WTF/wtf/PlatformHave.h 2021-02-02 03:23:38 UTC (rev 272188)
@@ -856,3 +856,9 @@
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000)
#define HAVE_LEVEL_2_SYSTEM_FONT_WIDTH_VALUES 1
#endif
+
+#if __has_include(<AVFoundation/AVPlayerInterstitialEventController.h>)
+#if !defined(HAVE_AVFOUNDATION_INTERSTITIAL_EVENTS)
+#define HAVE_AVFOUNDATION_INTERSTITIAL_EVENTS 1
+#endif
+#endif
Modified: trunk/Source/WebCore/ChangeLog (272187 => 272188)
--- trunk/Source/WebCore/ChangeLog 2021-02-02 03:22:18 UTC (rev 272187)
+++ trunk/Source/WebCore/ChangeLog 2021-02-02 03:23:38 UTC (rev 272188)
@@ -1,5 +1,15 @@
2021-02-01 Jer Noble <[email protected]>
+ [Cocoa] Disable interstitial events on AVPlayerItem.
+ https://bugs.webkit.org/show_bug.cgi?id=221215
+
+ Reviewed by Eric Carlson.
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
+
+2021-02-01 Jer Noble <[email protected]>
+
REGRESSION (iOS 14.2): Can't play html audio with muted attribute
https://bugs.webkit.org/show_bug.cgi?id=219295
<rdar://problem/71863148>
Modified: trunk/Source/WebCore/PAL/ChangeLog (272187 => 272188)
--- trunk/Source/WebCore/PAL/ChangeLog 2021-02-02 03:22:18 UTC (rev 272187)
+++ trunk/Source/WebCore/PAL/ChangeLog 2021-02-02 03:23:38 UTC (rev 272188)
@@ -1,3 +1,12 @@
+2021-02-01 Jer Noble <[email protected]>
+
+ [Cocoa] Disable interstitial events on AVPlayerItem.
+ https://bugs.webkit.org/show_bug.cgi?id=221215
+
+ Reviewed by Eric Carlson.
+
+ * pal/spi/cocoa/AVFoundationSPI.h:
+
2021-01-29 Myles C. Maxfield <[email protected]>
font-stretch is not applied to system-ui
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h (272187 => 272188)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h 2021-02-02 03:22:18 UTC (rev 272187)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h 2021-02-02 03:23:38 UTC (rev 272188)
@@ -53,6 +53,10 @@
#import <AVFoundation/AVPlayer.h>
#import <AVFoundation/AVPlayerItem.h>
+#if HAVE(AVFOUNDATION_INTERSTITIAL_EVENTS)
+#import <AVFoundation/AVPlayerInterstitialEventController.h>
+#endif
+
NS_ASSUME_NONNULL_BEGIN
@interface AVPlayerItem ()
@property (nonatomic, readonly) NSTimeInterval seekableTimeRangesLastModifiedTime NS_AVAILABLE(10_13, 11_0);
@@ -413,5 +417,12 @@
@interface AVSampleBufferDisplayLayer (VideoOutput)
@property (nonatomic, nullable) AVSampleBufferVideoOutput *output;
@end
+
+#if HAVE(AVFOUNDATION_INTERSTITIAL_EVENTS)
+@interface AVPlayerItem (AVPlayerInterstitialSupport)
+@property (nonatomic) BOOL automaticallyHandlesInterstitialEvents;
+@end
+#endif
+
#endif // USE(APPLE_INTERNAL_SDK)
#endif // HAVE(AVSAMPLEBUFFERVIDEOOUTPUT)
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (272187 => 272188)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2021-02-02 03:22:18 UTC (rev 272187)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2021-02-02 03:23:38 UTC (rev 272188)
@@ -1070,6 +1070,13 @@
[m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(player()->pitchCorrectionAlgorithm(), player()->preservesPitch())];
+#if HAVE(AVFOUNDATION_INTERSTITIAL_EVENTS)
+ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
+ if ([m_avPlayerItem respondsToSelector:@selector(setAutomaticallyHandlesInterstitialEvents:)])
+ [m_avPlayerItem setAutomaticallyHandlesInterstitialEvents:NO];
+ALLOW_NEW_API_WITHOUT_GUARDS_END
+#endif
+
if (m_avPlayer)
setAVPlayerItem(m_avPlayerItem.get());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes