Skip to content

AVKit iOS xcode14.0 beta1

TJ Lambert edited this page Aug 30, 2022 · 3 revisions

#AVKit.framework https://github.com/xamarin/xamarin-macios/pull/15811

diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVInterstitialTimeRange.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVInterstitialTimeRange.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVInterstitialTimeRange.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVInterstitialTimeRange.h	2022-05-31 14:51:32.000000000 -0400
@@ -0,0 +1,39 @@
+/*
+	File:  AVInterstitialTimeRange.h
+	
+	Framework:  AVKit
+	
+	Copyright © 2015-2021 Apple Inc. All rights reserved.
+	
+ */
+
+#import <Foundation/Foundation.h>
+#import <CoreMedia/CMTimeRange.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+	@class		AVInterstitialTimeRange
+	@abstract	AVInterstitialTimeRange represents the time range of an interstitial.
+	@discussion	An AVInterstitialTimeRange identifies a portion of an asset as an interstitial. When the asset is presented, the time range of this interstitial content will be collapsed in the user interface timeline to a single dot, scrubbing will skip over this range, and the duration will be subtracted from the time remaining in the video as displayed to the user.
+ */
+
+API_AVAILABLE(tvos(9.0), ios(16.0)) API_UNAVAILABLE(macos, watchos)
+@interface AVInterstitialTimeRange : NSObject <NSCopying, NSSecureCoding>
+
+/*!
+	@method		initWithTimeRange:
+	@param		timeRange
+				The time range of the interstitial.
+	@abstract	Designated initializer.
+*/
+ - (instancetype)initWithTimeRange:(CMTimeRange)timeRange API_AVAILABLE(tvos(9.0)) API_UNAVAILABLE(ios, macos, watchos) NS_DESIGNATED_INITIALIZER;
+/*!
+	@property	timeRange
+	@abstract	The time range of the interstitial.
+*/
+@property (readonly) CMTimeRange timeRange;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVKit.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVKit.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVKit.h	2022-02-05 15:08:52.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVKit.h	2022-05-21 09:08:49.000000000 -0400
@@ -26,21 +26,28 @@
 #endif // TARGET_OS_OSX || TARGET_OS_MACCATALYST
 
 
+
 #if TARGET_OS_IPHONE
 #import <AVKit/AVError.h>
+#if !TARGET_OS_MACCATALYST
+#import <AVKit/AVInterstitialTimeRange.h>
+#endif // TARGET_OS_MACCATALYST
 #import <AVKit/AVPictureInPictureController.h>
 #import <AVKit/AVPictureInPictureController_AVSampleBufferDisplayLayerSupport.h>
 #import <AVKit/AVPictureInPictureController_VideoCallSupport.h>
+#import <AVKit/AVPlaybackSpeed.h>
+#import <AVKit/AVPlaybackSpeedCollection.h>
 #import <AVKit/AVPlayerItem+AVKitAdditions.h>
 #import <AVKit/AVPlayerViewController.h>
 #import <AVKit/AVPlaybackRouteSelecting.h>
 #import <AVKit/AVRoutePickerView.h>
 
 #else
-
 #import <AVKit/AVCaptureView.h>
 #import <AVKit/AVPictureInPictureController.h>
 #import <AVKit/AVPictureInPictureController_AVSampleBufferDisplayLayerSupport.h>
+#import <AVKit/AVPlaybackSpeed.h>
+#import <AVKit/AVPlaybackSpeedCollection.h>
 #import <AVKit/AVPlayerView.h>
 #import <AVKit/AVRoutePickerView.h>
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVKitDefines.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVKitDefines.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVKitDefines.h	2022-02-23 07:58:39.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVKitDefines.h	2022-05-31 14:51:32.000000000 -0400
@@ -16,12 +16,25 @@
 #define AVKIT_EXTERN	extern __attribute__((visibility ("default")))
 #endif
 
+
 #if !TARGET_IS_AVKITMACHELPER
 #define AVKIT_ONLY_EXTERN AVKIT_EXTERN
 #define AVKIT_ONLY_API_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__)
+
+#define AVKIT_ONLY_API_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__)
+#define AVKIT_ONLY_API_DEPRECATED_WITH_REPLACEMENT(...) API_DEPRECATED_WITH_REPLACEMENT(__VA_ARGS__)
+
 #else
 #define AVKIT_ONLY_EXTERN extern __attribute__((visibility ("hidden")))
 #define AVKIT_ONLY_API_AVAILABLE(...)
+
+#define AVKIT_ONLY_API_DEPRECATED_WITH_REPLACEMENT(...)
+
 #endif
 
+
 #define PLATFORM_SUPPORTS_AVKITCORE (TARGET_OS_OSX || TARGET_OS_MACCATALYST)
+
+
+#define AVKIT_INIT_UNAVAILABLE	- (instancetype)init NS_UNAVAILABLE; \
+								+ (instancetype)new  NS_UNAVAILABLE;
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackSpeed.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackSpeed.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackSpeed.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackSpeed.h	2022-05-31 14:51:32.000000000 -0400
@@ -0,0 +1,71 @@
+//
+//  AVPlaybackSpeed.h
+//  AVKit
+//
+//  Created by adesjarlais on 11/13/21.
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
+#import <AVKitCore/AVKitDefines.h>
+#else
+#import <AVKit/AVKitDefines.h>
+#endif // #TARGET_OS_OSX || TARGET_OS_MACCATALYST
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+// MARK: -
+
+/*!
+ @class         AVPlaybackSpeed
+ @abstract      Class used to define a user selectable playback speed in a playback UI.
+ */
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos)
+@interface AVPlaybackSpeed : NSObject
+
+AVKIT_INIT_UNAVAILABLE
+
+/*!
+ @property      systemDefaultSpeeds
+ @abstract      A list of playback speeds to be used by default across the system.
+ */
+@property (nonatomic, readonly, class) NSArray<AVPlaybackSpeed *> *systemDefaultSpeeds;
+
+
+/*!
+ @method         initWithRate:localizedName:
+ @param         rate
+				The rate to be used when this playback speed is selected.
+ @param         localizedName
+				A localized name to be displayed representing this playback speed in a UI.
+ @abstract      Initializes an AVPlaybackSpeed.
+ */
+- (instancetype)initWithRate:(float)rate localizedName:(NSString *)localizedName;
+
+
+/*!
+ @property      rate
+ @abstract      The rate associated with this object. When this playback speed is selected this rate will be set in response to the play button being pressed.
+ */
+@property (nonatomic, readonly) float rate;
+
+/*!
+ @property      localizedName
+ @abstract      A localized name for this playback speed.
+ @discussion    This name will be used to represent this playback speed in playback UIs where more space is available.
+ */
+@property (nonatomic, readonly) NSString *localizedName;
+
+/*!
+ @property      localizedNumericName
+ @abstract      A localized name for this playback speed used when space is limited.
+ @discussion    This name will be used to represent this playback speed in playback UIs where limited space is available.
+ */
+@property (nonatomic, readonly) NSString *localizedNumericName;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackSpeedCollection.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackSpeedCollection.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackSpeedCollection.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlaybackSpeedCollection.h	2022-05-31 14:51:32.000000000 -0400
@@ -0,0 +1,76 @@
+//
+//  AVPlaybackSpeedCollection.h
+//  AVKit
+//
+//  Created by adesjarlais on 11/13/21.
+//  Copyright © 2021 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
+#import <AVKitCore/AVKitDefines.h>
+#import <AVKitCore/AVPlaybackSpeed.h>
+#else
+#import <AVKit/AVKitDefines.h>
+#import <AVKit/AVPlaybackSpeed.h>
+#endif // #TARGET_OS_OSX || TARGET_OS_MACCATALYST
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+// MARK: -
+
+/*!
+ @class         AVPlaybackSpeedCollection
+ @abstract      A class representing a collection of user selectable playback speeds in a playback UI.
+ */
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos)
+@interface AVPlaybackSpeedCollection : NSObject
+
+AVKIT_INIT_UNAVAILABLE
+
+/*!
+ @method      	defaultSpeedFromList
+ @param         speeds
+				The playback speeds to select from
+ @abstract      Returns the playback speed that should be used by default from the given list.
+ */
++ (AVPlaybackSpeed *)defaultSpeedFromList:(NSArray<AVPlaybackSpeed *> *)speeds;
+
+
+/*!
+ @method        collectionWithSpeeds:
+ @param         playbackSpeeds
+				A list of playback speeds to be used for this collection.
+ @abstract      Creates a new instance of an AVPlaybackSpeedCollection with the given playback speeds.
+ */
++ (instancetype)collectionWithSpeeds:(NSArray<AVPlaybackSpeed *> *)playbackSpeeds;
+
+
+/*!
+ @property      speeds
+ @abstract      The list of playback speeds in this collection.
+ */
+@property (nonatomic, readonly) NSArray<AVPlaybackSpeed *> *speeds;
+
+/*!
+ @property      selectedSpeed
+ @abstract      The currently selected playback speed in this collection.
+ @discussion    Changes to the associated AVPlayer's defaultRate will be reflected in this property and vice versa. If the associated AVPlayer's defaultRate is set to a value that does not match a speed in the collection, the selected speed will be set to nil.
+ */
+@property (nonatomic, readonly, nullable) AVPlaybackSpeed *selectedSpeed;
+
+
+/*!
+ @method      selectSpeed
+ @param         speed
+				The playback speed to select.
+ @abstract      Selects the input AVPlaybackSpeed on this collection.
+ @discussion    Calls to selectSpeed: with AVPlaybackSpeeds not contained within this collection will be ignored.
+ */
+- (void)selectSpeed:(AVPlaybackSpeed *)speed;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerItem+AVKitAdditions.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerItem+AVKitAdditions.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerItem+AVKitAdditions.h	2022-02-23 07:58:39.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerItem+AVKitAdditions.h	2022-05-31 14:51:32.000000000 -0400
@@ -3,13 +3,14 @@
  
  Framework:  AVKit
  
- Copyright © 2019 Apple Inc. All rights reserved.
+ Copyright © 2019-2022 Apple Inc. All rights reserved.
  
  */
 
 #import <AVFoundation/AVPlayerItem.h>
 
 @class AVMetadataItem;
+@class AVInterstitialTimeRange;
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -22,6 +23,13 @@
  */
 @property (nonatomic, copy) NSArray<AVMetadataItem *> *externalMetadata API_AVAILABLE(ios(12.2));
 
+/*!
+	 @property	 interstitialTimeRanges
+	 @abstract	 An array of time ranges that identifies interstitial content. Each element specifies the time range of the media occupied by the interstitials.
+	 @discussion An interstitial time range identifies a range of an asset that is collapsed into a single dot on the timeline in the user interface. Interstitial content is typically not related to the video being played (e.g. advertisements). On iOS, interstitials must be defined by the stream, or by using an AVPlayerInterstitialEventController.
+ */
+@property (nonatomic, readonly) NSArray<AVInterstitialTimeRange *> *interstitialTimeRanges API_AVAILABLE(ios(16.0)) API_UNAVAILABLE(macCatalyst);
+
 @end
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerViewController.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerViewController.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerViewController.h	2022-02-23 07:58:39.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVPlayerViewController.h	2022-05-31 15:04:46.000000000 -0400
@@ -3,22 +3,28 @@
 	
 	Framework:  AVKit
 	
-	Copyright © 2014-2017 Apple Inc. All rights reserved.
+	Copyright © 2014-2022 Apple Inc. All rights reserved.
 	
  */
 
 #import <UIKit/UIKit.h>
 #import <AVFoundation/AVFoundation.h>
 
+
 NS_ASSUME_NONNULL_BEGIN
 
+@class AVInterstitialTimeRange;
+@class AVPlaybackSpeedCollection;
+
 @protocol AVPlayerViewControllerDelegate;
 
+
+// MARK: -
+
 /*!
 	@class		AVPlayerViewController
 	@abstract	AVPlayerViewController is a subclass of UIViewController that can be used to display the visual content of an AVPlayer object and the standard playback controls.
  */
-
 API_AVAILABLE(ios(8.0)) API_UNAVAILABLE(macos, watchos, tvos)
 @interface AVPlayerViewController : UIViewController
 
@@ -73,6 +79,12 @@
 @property (nonatomic) BOOL allowsPictureInPicturePlayback API_AVAILABLE(ios(9.0));
 
 /*!
+	@property	allowsVideoFrameAnalysis
+	@abstract	When set to YES, the AVPlayerViewController will try to find objects, text and people while the media is paused. When an object is found, the user will be able to interact with it using long press to present a context menu. Default is YES.
+*/
+@property (nonatomic) BOOL allowsVideoFrameAnalysis API_AVAILABLE(ios(16.0)) API_UNAVAILABLE(macos, tvos, watchos, macCatalyst);
+
+/*!
      @property    canStartPictureInPictureAutomaticallyFromInline
      @abstract    Indicates whether Picture in Picture should be allowed to start automatically when transitioning to background when the receiver’s content is embedded inline. Default is NO.
      @discussion  This property must only be set to YES for content intended to be the user's primary focus.
@@ -119,6 +131,15 @@
  */
 @property (nonatomic, weak, nullable) id <AVPlayerViewControllerDelegate> delegate API_AVAILABLE(ios(9.0));
 
+/*!
+	@property	playbackSpeedCollection
+	@abstract	A collection of user selectable playback speeds to be shown in the standard playback controls UI.
+	@discussion	By default this property will be set to an AVPlaybackSpeedCollection with the platform default playback speeds (defined in [AVPlaybackSpeed systemDefaultSpeeds]). Setting this property to nil will hide the playback speed selection UI.
+				
+				To set the currently selected playback speed programmatically, either set the defaultRate on the AVPlayer associated with this view controller or call selectSpeed: the playback collection to the desired speed.
+ */
+@property (nonatomic, readwrite, nullable) AVPlaybackSpeedCollection *playbackSpeedCollection API_AVAILABLE(ios(16.0));
+
 @end
 
 
@@ -222,6 +243,26 @@
  */
 - (void)playerViewController:(AVPlayerViewController *)playerViewController restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:(void (^)(BOOL restored))completionHandler;
 
+/*!
+	@method		playerViewController:willPresentInterstitialTimeRange:
+	@param		playerViewController
+				The player view controller.
+	@param		interstitial
+				The interstitial time range.
+	@abstract	The delegate can implement this method to be notified when the player view controller is about to present interstitial content to the user.
+ */
+- (void)playerViewController:(AVPlayerViewController *)playerViewController willPresentInterstitialTimeRange:(AVInterstitialTimeRange *)interstitial API_AVAILABLE(ios(16.0)) API_UNAVAILABLE(macCatalyst);
+
+/*!
+	@method		playerViewController:didPresentInterstitialTimeRange:
+	@param		playerViewController
+				The player view controller.
+	@param		interstitial
+				The interstitial time range.
+	@abstract	The delegate can implement this method to be notified when the player view controller has finished presenting interstitial content.
+ */
+- (void)playerViewController:(AVPlayerViewController *)playerViewController didPresentInterstitialTimeRange:(AVInterstitialTimeRange *)interstitial API_AVAILABLE(ios(16.0)) API_UNAVAILABLE(macCatalyst);
+
 @end
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVRoutePickerView.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVRoutePickerView.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVRoutePickerView.h	2022-02-23 07:58:39.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AVKit.framework/Headers/AVRoutePickerView.h	2022-05-31 14:51:32.000000000 -0400
@@ -9,6 +9,7 @@
 
 #import <UIKit/UIKit.h>
 
+@class AVCustomRoutingController;
 @protocol AVRoutePickerViewDelegate;
 
 NS_ASSUME_NONNULL_BEGIN
@@ -60,6 +61,12 @@
  */
 @property (nonatomic) BOOL prioritizesVideoDevices API_AVAILABLE(ios(13.0), tvos(13.0));
 
+/*!
+	@property	customRoutingController
+	@abstract	A controller which enables connection to 3rd party devices (non-airplay) via the picker.
+ */
+@property (nonatomic, nullable) AVCustomRoutingController *customRoutingController API_AVAILABLE(ios(16.0)) API_UNAVAILABLE(macos, tvos);
+
 @end
 
 
Clone this wiki locally