Streamaxia Open SDK  3.2
AXRecorder.h
1 //
2 // AXRecorder.h
3 // StreamaxiaSDK
4 //
5 // Created by Mihaita Babici on 7/15/16.
6 // Copyright © 2016 Agilio. All rights reserved.
7 //
8 
9 @import Foundation;
10 @import UIKit;
11 
12 #import "AXSDKDefines.h"
13 #import "AXReachability.h"
14 
15 @class AXRecorderSettings;
16 @class AXStreamInfo;
17 @class AXInfo, AXWarning, AXError;
18 
30 typedef NS_ENUM(NSInteger, AXRecorderState) {
31  AXRecorderStateUnknown = -1,
32  AXRecorderStateStopped = 0,
33  AXRecorderStateRecording,
34  AXRecorderStateStarting,
35  AXRecorderStateStopping,
36  AXRecorderStateCollectingExtraData,
37  AXRecorderStateProcessingExtraData
38 };
39 
40 @protocol AXRecorderDelegate;
41 
45 @interface AXRecorder : NSObject
46 
50 
54 @property (nonatomic, weak, readwrite) id<AXRecorderDelegate> recorderDelegate;
55 
59 @property (nonatomic, strong, readonly) AXRecorderSettings *settings;
60 
64 @property (nonatomic, strong, readonly) AXStreamInfo *info;
65 
69 @property (nonatomic, assign, readonly) AXRecorderState state;
70 
74 @property (nonatomic, assign, readonly) BOOL isActive;
75 
79 @property (nonatomic, assign, readonly) BOOL isRecording;
80 
84 @property (nonatomic, assign, readonly) BOOL isStreaming;
85 
89 @property (nonatomic, assign, readonly) BOOL hasInternetConnection;
90 
94 @property (nonatomic, assign, readonly) BOOL hasMicrophoneAccess;
95 
99 @property (nonatomic, assign, readonly) BOOL hasCameraAccess;
100 
104 
113 + (instancetype)recorderWithStreamInfo:(AXStreamInfo *)info settings:(AXRecorderSettings *)settings;
114 
118 
127 - (instancetype)setupWithView:(UIView *)view;
128 
135 - (void)prepareToRecord;
136 
144 - (void)startStreamingWithCompletion:(void (^)(BOOL success, AXError *error))completionBlock;
145 
149 - (void)stopStreaming;
150 
151 @end
152 
157 @protocol AXRecorderDelegate <NSObject>
158 
159 @optional
160 
168 - (void)recorder:(AXRecorder *)recorder didChangeState:(AXRecorderState)state;
169 
177 - (void)recorder:(AXRecorder *)recorder didUpdateStreamTime:(NSTimeInterval)deltaTime;
178 
185 - (void)recorder:(AXRecorder *)recorder didReceiveInfo:(AXInfo *)info;
186 
196 - (void)recorder:(AXRecorder *)recorder didReceiveWarning:(AXWarning *)warning;
197 
207 - (void)recorder:(AXRecorder *)recorder didReceiveError:(AXError *)error;
208 
215 - (void)recorder:(AXRecorder *)recorder didChangeNetworkStatus:(AXNetworkStatus)status;
216 
217 @end
AXRecorderState state
Definition: AXRecorder.h:69
void prepareToRecord()
BOOL isStreaming
Definition: AXRecorder.h:84
Definition: AXInfo.h:16
BOOL isRecording
Definition: AXRecorder.h:79
Definition: AXRecorder.h:45
Definition: AXRecorderSettings.h:14
void stopStreaming()
Definition: AXWarning.h:16
id< AXRecorderDelegate > recorderDelegate
Definition: AXRecorder.h:54
BOOL hasInternetConnection
Definition: AXRecorder.h:89
BOOL hasCameraAccess
Definition: AXRecorder.h:99
AXStreamInfo * info
Definition: AXRecorder.h:64
BOOL hasMicrophoneAccess
Definition: AXRecorder.h:94
Definition: AXError.h:16
BOOL isActive
Definition: AXRecorder.h:74
AXRecorderSettings * settings
Definition: AXRecorder.h:59
Definition: AXStreamInfo.h:15