IMP(低代码音视频工厂)SDK v1.5.0
IMP SDK API Reference Manual for iOS Platforms
AIRBRTCProtocol.h
1//
2// AIRBRTCProtocol.h
3// AliInteractiveRoomBundle
4//
5// Created by fernando on 2021/6/22.
6// Copyright © 2021 AliYun. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import <UIKit/UIKit.h>
11
12#import <AliInteractiveRoomBundle/AIRBCommonDefines.h>
13
14NS_ASSUME_NONNULL_BEGIN
15
17@class AIRBRTCConfig;
20
21@protocol AIRBRTCDelegate <NSObject>
22- (void) onAIRBRTCErrorWithCode:(AIRBErrorCode)code message:(NSString*)msg;
23- (void) onAIRBRTCEvent:(AIRBRTCEvent)event info:(NSDictionary*)info;
24
31- (void) onAIRBRTCRemotePeerViewAvailable:(NSString*)userID view:(UIView*)view type:(AIRBRTCVideoViewType)type;
32
38- (void) onAIRBRTCRemotePeerVideoFirstFrameDrawn:(NSString*)userID type:(AIRBRTCVideoViewType)type;
39
44- (void) onAIRBRTCActiveSpeaker:(NSString*)userID;
45
51- (void)onAIRBRTCAudioVolumeCallback:(NSArray <AIRBRTCUserVolumeInfo *> *_Nullable)volumeInfoArray totalVolume:(int)totalVolume;
52
60- (void)onAIRBRTCNetworkQualityChanged:(NSString *_Nonnull)userID
61 upNetworkQuality:(AIRBRTCNetworkQuality)upQuality
62 downNetworkQuality:(AIRBRTCNetworkQuality)downQuality;
63@end
64
65@protocol AIRBRTCProtocol <NSObject>
66
70@property (strong, nonatomic) UIView* rtcLocalView;
71
76@property (nonatomic, assign) BOOL previewMirrorEnabled;
77
82@property (nonatomic, assign) BOOL videoStreamMirrorEnabled;
83
87@property (weak, nonatomic) id<AIRBRTCDelegate> delegate;
88
93- (void) setConfig:(AIRBRTCConfig*)config;
94
99- (void) joinChannel;
100
107- (void) leaveChannel:(BOOL)destroy;
108
113//- (void) leaveChannel;
114
119- (void) addPeers:(NSArray<NSString*>*)userIDs;
120
125- (void) removePeers:(NSArray<NSString*>*)userIDs;
126
132- (void) approveJoiningApplication:(BOOL)approve fromPeer:(NSString*)userID; //approveRTCJoiningApplication
133
138- (void) acceptCall:(BOOL)accept;
139
144- (void) applyForJoining:(BOOL)applyOrWithdraw;
145
154- (void) queryCurrentPeerListWithType:(AIRBRTCPeerType)type
155 pageNum:(int32_t)pageNum
156 pageSize:(int32_t)pageSize
157 onSuccess:(void(^)(AIRBRoomChannelUserListResponse* rsp))onSuccess
158 onFailure:(void(^)(NSString* errorMessage))onFailure;
159
166- (void) muteLocalMicphone:(BOOL)mute
167 onSuccess:(void(^)(void))onSuccess
168 onFailure:(void(^)(NSString* errorMessage))onFailure;
169
177- (void) muteRemoteMicphone:(BOOL)mute remotePeer:(NSString*)userID
178 onSuccess:(void(^)(void))onSuccess
179 onFailure:(void(^)(NSString* errorMessage))onFailure;
180
188- (void) muteAllRemoteMicphone:(BOOL)mute
189 onSuccess:(void(^)(void))onSuccess
190 onFailure:(void(^)(NSString* errorMessage))onFailure;
191
199- (void) muteLocalCamera:(BOOL)mute
200 onSuccess:(void(^)(void))onSuccess
201 onFailure:(void(^)(NSString* errorMessage))onFailure;
202
209- (void) setBasicFaceBeauty:(BOOL)enable
210 whiteningLevel:(float)whiteningLevel
211 smoothnessLevel:(float)smoothnessLevel;
212
219- (void) subscribeRemoteAudioStream:(BOOL)sub fromUser:(NSString*)userID;
220
227- (void) subscribeRemoteVideoStream:(BOOL)sub type:(AIRBRTCVideoStreamType)type fromUser:(NSString*)userID;
228
234- (void) subscribeRemoteScreenShareStream:(BOOL)sub fromUser:(NSString*)userID;
235
239- (void) toggleLocalCamera;
240
246- (int)startScreenShare:(NSString*)appGroup;
247
252- (int)stopScreenShare;
253
259- (void) startBypassLiveStreaming:(AIRBRTCBypassLiveResolutionType)resolutionType;
260
265- (void) stopBypassLiveStreaming:(BOOL)destroy;
266
274- (void) setBypassLiveLayout:(AIRBRTCBypassLiveLayoutType)type
275 userIDs:(NSArray<NSString*>* _Nonnull) userIDs
276 onSuccess:(void(^)(void))onSuccess
277 onFailure:(void(^)(NSString* error))onFailure;
278
285- (void) setCustomBypassLiveLayout:(NSArray<AIRBRTCBypassLiveLayoutPeerVideoModel*>*) peerModels
286 onSuccess:(void(^)(void))onSuccess
287 onFailure:(void(^)(NSString* error))onFailure;
288
295- (void) startRecording:(AIRBRTCBypassLiveResolutionType)resolutionType
296 onSuccess:(void(^)(void))onSuccess
297 onFailure:(void(^)(NSString* error))onFailure;
298
304- (void) pauseRecordingOnSuccess:(void(^)(void))onSuccess onFailure:(void(^)(NSString* error))onFailure;
305
312- (void) resumeRecording:(AIRBRTCBypassLiveResolutionType)resolutionType
313 onSuccess:(void(^)(void))onSuccess
314 onFailure:(void(^)(NSString* error))onFailure;
315
321- (void) stopRecordingOnSuccess:(void(^)(void))onSuccess onFailure:(void(^)(NSString* error))onFailure;
322
329- (void) getRecordedVideoUrlWithConferenceID:(NSString*)conferenceID
330 onSuccess:(void(^)(NSString* url))onSuccess
331 onFailure:(void(^)(NSString* error))onFailure;
332
333
334@end
335
336NS_ASSUME_NONNULL_END
Definition: AIRBRTCBypassLiveLayoutPeerVideoModel.h:14
Definition: AIRBRTCConfig.h:17
Definition: AIRBRTCUserVolumeInfo.h:14
Definition: AIRBRoomChannelUserListResponse.h:16
Definition: AIRBRTCProtocol.h:21
Definition: AIRBRTCProtocol.h:65
UIView * rtcLocalView
Definition: AIRBRTCProtocol.h:70
id< AIRBRTCDelegate > delegate
Definition: AIRBRTCProtocol.h:87
BOOL videoStreamMirrorEnabled
Definition: AIRBRTCProtocol.h:82
BOOL previewMirrorEnabled
Definition: AIRBRTCProtocol.h:76