UnityReplayKit.h
1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#if UNITY_REPLAY_KIT_AVAILABLE
#import <Foundation/Foundation.h>
#import <ReplayKit/ReplayKit.h>
@interface UnityReplayKit : NSObject<RPPreviewViewControllerDelegate, RPScreenRecorderDelegate>
{
}
+ (instancetype)sharedInstance;
@property(nonatomic, readonly) BOOL apiAvailable;
@property(nonatomic, readonly) NSString* lastError;
@property(nonatomic, readonly) RPPreviewViewController* previewController;
@property(nonatomic, readonly) BOOL recordingPreviewAvailable;
@property(nonatomic, readonly, getter = isRecording) BOOL recording;
- (BOOL)startRecording;
- (BOOL)stopRecording;
- (BOOL)showPreview;
- (BOOL)discardPreview;
- (void)screenRecorder:(RPScreenRecorder*)screenRecorder didStopRecordingWithError:(NSError*)error previewViewController:(RPPreviewViewController*)previewViewController;
- (void)previewControllerDidFinish:(RPPreviewViewController*)previewController;
@property(nonatomic, readonly) BOOL broadcastingApiAvailable;
@property(nonatomic, readonly) BOOL isBroadcasting;
@property(nonatomic, readonly) BOOL isBroadcastingPaused;
@property(nonatomic, readonly) BOOL isPreviewControllerActive;
@property(nonatomic, readonly) NSURL* broadcastURL;
@property(nonatomic, setter = setCameraEnabled:, getter = isCameraEnabled) BOOL cameraEnabled;
@property(nonatomic, setter = setMicrophoneEnabled:, getter = isMicrophoneEnabled) BOOL microphoneEnabled;
- (void)startBroadcastingWithCallback:(void *)callback;
- (void)stopBroadcasting;
- (void)pauseBroadcasting;
- (void)resumeBroadcasting;
- (BOOL)showCameraPreviewAt:(CGPoint)position width:(float)width height:(float)height;
- (void)hideCameraPreview;
- (void)createOverlayWindow;
@end
#endif // UNITY_REPLAY_KIT_AVAILABLE