Skip to content

ReplayKit tvOS xcode13.0 beta1

tj_devel709 edited this page Jun 28, 2021 · 3 revisions

#ReplayKit.framework https://github.com/xamarin/xamarin-macios/pull/12026

diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ReplayKit.framework/Headers/RPError.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ReplayKit.framework/Headers/RPError.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ReplayKit.framework/Headers/RPError.h	2021-03-16 08:46:19.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ReplayKit.framework/Headers/RPError.h	2021-06-02 11:05:22.000000000 -0400
@@ -48,6 +48,7 @@
     RPRecordingErrorFailedToStartCaptureStack = -5833,              // Failed to start due to video/audio capture failure
     RPRecordingErrorInvalidParameter = -5834,                       // Failed due to invalid parameter
     RPRecordingErrorFilePermissions = -5835,                        // Failed due to file permissions error
+    RPRecordingErrorExportClipToURLInProgress = -5836,              // Failed due to clip export in progress
     RPRecordingErrorCodeSuccessful = 0                              // Successfully saved video to camera roll
 };
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ReplayKit.framework/Headers/RPScreenRecorder.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ReplayKit.framework/Headers/RPScreenRecorder.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ReplayKit.framework/Headers/RPScreenRecorder.h	2021-03-16 09:55:48.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/ReplayKit.framework/Headers/RPScreenRecorder.h	2021-06-02 11:08:23.000000000 -0400
@@ -84,6 +84,26 @@
  */
 - (void)stopCaptureWithHandler:(nullable void (^)(NSError *_Nullable error))handler API_AVAILABLE(ios(11.0), tvos(11.0), macos(11.0));
 
+/*!
+@abstract Start clip recording buffering with a completion handler. Note that before recording actually starts, the user may be prompted with UI to confirm recording.
+@discussion handler Called after clip recording is started. Will be passed an optional NSError in the RPRecordingErrorDomain domain if there was an issue starting clip record buffering.
+*/
+- (void)startClipBufferingWithCompletionHandler:(nullable void (^)(NSError *_Nullable error))completionHandler API_AVAILABLE(ios(15.0), macos(12.0)) API_UNAVAILABLE(tvos);
+
+/*!
+@abstract Stop clip recording buffering with a completion handler.
+@discussion handler Called after clip recording session is stopped. Will be passed an optional NSError in the RPRecordingErrorDomain domain if there was an issue stopping clip record buffering.
+*/
+- (void)stopClipBufferingWithCompletionHandler:(nullable void (^)(NSError *_Nullable error))completionHandler API_AVAILABLE(ios(15.0), macos(12.0)) API_UNAVAILABLE(tvos);
+
+/*!
+@abstract Exports clip recording
+@param url URL containing absolute path for where to save the clip
+@param duration Length of time in seconds for clip recording, capped at either the elapsed time, or a maximum of 15 seconds, depending on which is the shorter amount of time
+@discussion Must be called after startClipBufferingWithCompletionHandler:, otherwise this will return an error. Exports clip recording from newest samples in buffer for duration. handler Will be called after asset is finished writing to output path. Will be passed an optional NSError in the RPRecordingErrorDomain domain if there was an issue generating the clip recording.
+*/
+- (void)exportClipToURL:(NSURL *)url duration:(NSTimeInterval)duration completionHandler:(nullable void (^)(NSError *_Nullable error))completionHandler API_AVAILABLE(ios(15.0), macos(12.0)) API_UNAVAILABLE(tvos);
+
 /* @abstract Delegate instance for RPScreenRecorder. */
 @property (nonatomic, weak, nullable) id<RPScreenRecorderDelegate> delegate;
 
Clone this wiki locally