| 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
AXRecorder::state
AXRecorderState state
Definition: AXRecorder.h:69
-[AXRecorder prepareToRecord]
void prepareToRecord()
AXRecorder::isStreaming
BOOL isStreaming
Definition: AXRecorder.h:84
AXInfo
Definition: AXInfo.h:16
AXRecorder::isRecording
BOOL isRecording
Definition: AXRecorder.h:79
AXRecorder
Definition: AXRecorder.h:45
AXRecorderSettings
Definition: AXRecorderSettings.h:14
-[AXRecorder stopStreaming]
void stopStreaming()
AXWarning
Definition: AXWarning.h:16
AXRecorder::recorderDelegate
id< AXRecorderDelegate > recorderDelegate
Definition: AXRecorder.h:54
AXRecorder::hasInternetConnection
BOOL hasInternetConnection
Definition: AXRecorder.h:89
AXRecorder::hasCameraAccess
BOOL hasCameraAccess
Definition: AXRecorder.h:99
AXRecorder::info
AXStreamInfo * info
Definition: AXRecorder.h:64
AXRecorder::hasMicrophoneAccess
BOOL hasMicrophoneAccess
Definition: AXRecorder.h:94
AXError
Definition: AXError.h:16
AXRecorder::isActive
BOOL isActive
Definition: AXRecorder.h:74
AXRecorder::settings
AXRecorderSettings * settings
Definition: AXRecorder.h:59
AXStreamInfo
Definition: AXStreamInfo.h:15