IMP(低代码音视频工厂)SDK v1.5.0
IMP SDK API Reference Manual for iOS Platforms
<AIRBRTCProtocol> Protocol Reference
Inheritance diagram for <AIRBRTCProtocol>:

Instance Methods

(void) - setConfig:
 
(void) - joinChannel
 
(void) - leaveChannel:
 
(void) - addPeers:
 
(void) - removePeers:
 
(void) - approveJoiningApplication:fromPeer:
 
(void) - acceptCall:
 
(void) - applyForJoining:
 
(void) - queryCurrentPeerListWithType:pageNum:pageSize:onSuccess:onFailure:
 
(void) - muteLocalMicphone:onSuccess:onFailure:
 
(void) - muteRemoteMicphone:remotePeer:onSuccess:onFailure:
 
(void) - muteAllRemoteMicphone:onSuccess:onFailure:
 
(void) - muteLocalCamera:onSuccess:onFailure:
 
(void) - setBasicFaceBeauty:whiteningLevel:smoothnessLevel:
 
(void) - subscribeRemoteAudioStream:fromUser:
 
(void) - subscribeRemoteVideoStream:type:fromUser:
 
(void) - subscribeRemoteScreenShareStream:fromUser:
 
(void) - toggleLocalCamera
 
(int) - startScreenShare:
 
(int) - stopScreenShare
 
(void) - startBypassLiveStreaming:
 
(void) - stopBypassLiveStreaming:
 
(void) - setBypassLiveLayout:userIDs:onSuccess:onFailure:
 
(void) - setCustomBypassLiveLayout:onSuccess:onFailure:
 
(void) - startRecording:onSuccess:onFailure:
 
(void) - pauseRecordingOnSuccess:onFailure:
 
(void) - resumeRecording:onSuccess:onFailure:
 
(void) - stopRecordingOnSuccess:onFailure:
 
(void) - getRecordedVideoUrlWithConferenceID:onSuccess:onFailure:
 

Properties

UIView * rtcLocalView
 
BOOL previewMirrorEnabled
 
BOOL videoStreamMirrorEnabled
 
id< AIRBRTCDelegatedelegate
 

Method Documentation

◆ acceptCall:

- (void) acceptCall: (BOOL)  accept

发送同意/拒绝连麦申请的消息

Parameters
acceptYES表示同意,NO表示拒绝

◆ addPeers:

- (void) addPeers: (NSArray< NSString * > *)  userIDs

离开RTC并结束RTC和旁路直播(如果有的话)

Note
旧版本接口,等同于stopBypassLiveStreaming:YES + leaveChannel:YES 发送邀请其他人加入RTC的消息
Parameters
userIDs被邀请的userID数组

◆ applyForJoining:

- (void) applyForJoining: (BOOL)  applyOrWithdraw

发送申请/撤销申请加入RTC的消息

Parameters
applyOrWithdrawYES表示申请,NO表示撤销申请

◆ approveJoiningApplication:fromPeer:

- (void) approveJoiningApplication: (BOOL)  approve
fromPeer: (NSString *)  userID 

发送同意/拒绝其他人加入RTC的申请的消息

Parameters
approveYES表示同意,NO表示拒绝
userID被同意/拒绝申请的userID

◆ getRecordedVideoUrlWithConferenceID:onSuccess:onFailure:

- (void) getRecordedVideoUrlWithConferenceID: (NSString *)  conferenceID
onSuccess: (void(^)(NSString *url))  onSuccess
onFailure: (void(^)(NSString *error))  onFailure 

获取录制的回放视频URL

Parameters
conferenceID回放视频的会议/连麦插件ID
onSuccess成功的回调
onFailure失败的回调

◆ joinChannel

- (void) joinChannel

加入RTC

Note
旧版本中命名为joinChannelWithConfig

◆ leaveChannel:

- (void) leaveChannel: (BOOL)  destroy

离开RTC

Parameters
destroyYES表示结束RTC,NO表示只离开不结束
Note
只有房主可以结束
注意:调用离开房间(AIRBRoomChannelProtocol中的leaveRoom)的时机,应该在离会成功(AIRBRTCEventLeaveSucceeded)或者结束RTC成功(AIRBRTCEventDestroySucceeded)之后

◆ muteAllRemoteMicphone:onSuccess:onFailure:

- (void) muteAllRemoteMicphone: (BOOL)  mute
onSuccess: (void(^)(void))  onSuccess
onFailure: (void(^)(NSString *errorMessage))  onFailure 

静音/解除静音全体成员

Parameters
muteYES为静音,NO为取消静音
onSuccess成功的回调
onFailure失败的回调
Note
只有房主可以调用

◆ muteLocalCamera:onSuccess:onFailure:

- (void) muteLocalCamera: (BOOL)  mute
onSuccess: (void(^)(void))  onSuccess
onFailure: (void(^)(NSString *errorMessage))  onFailure 

关闭/开启本地摄像头和本地预览

Parameters
muteYES为关闭,NO为开启
onSuccess成功的回调
onFailure失败的回调
Note
开启摄像头会自动开启本地预览

◆ muteLocalMicphone:onSuccess:onFailure:

- (void) muteLocalMicphone: (BOOL)  mute
onSuccess: (void(^)(void))  onSuccess
onFailure: (void(^)(NSString *errorMessage))  onFailure 

静音/开启本地麦克风

Parameters
muteYES为关闭,NO为开启
onSuccess成功的回调
onFailure失败的回调

◆ muteRemoteMicphone:remotePeer:onSuccess:onFailure:

- (void) muteRemoteMicphone: (BOOL)  mute
remotePeer: (NSString *)  userID
onSuccess: (void(^)(void))  onSuccess
onFailure: (void(^)(NSString *errorMessage))  onFailure 

静音/解除静音某个成员

Parameters
muteYES为静音,NO为取消静音
onSuccess成功的回调
onFailure失败的回调
Note
只有房主可以调用

◆ pauseRecordingOnSuccess:onFailure:

- (void) pauseRecordingOnSuccess: (void(^)(void))  onSuccess
onFailure: (void(^)(NSString *error))  onFailure 

暂停录制

Parameters
onSuccess成功的回调
onFailure失败的回调

◆ queryCurrentPeerListWithType:pageNum:pageSize:onSuccess:onFailure:

- (void) queryCurrentPeerListWithType: (AIRBRTCPeerType)  type
pageNum: (int32_t)  pageNum
pageSize: (int32_t)  pageSize
onSuccess: (void(^)(AIRBRoomChannelUserListResponse *rsp))  onSuccess
onFailure: (void(^)(NSString *errorMessage))  onFailure 

分页请求RTC成员列表

Parameters
type成员类型:已加入RTC / 申请加入RTC
pageNum页码
pageSize每页的数据条数
onSuccess成功的回调
onFailure失败的回调

◆ removePeers:

- (void) removePeers: (NSArray< NSString * > *)  userIDs

发送将其他人踢出RTC的消息

Parameters
userIDs被踢出的userID数组

◆ resumeRecording:onSuccess:onFailure:

- (void) resumeRecording: (AIRBRTCBypassLiveResolutionType)  resolutionType
onSuccess: (void(^)(void))  onSuccess
onFailure: (void(^)(NSString *error))  onFailure 

恢复录制

Parameters
resolutionType录制分辨率类型,具体见AIRBRTCBypassLiveResolutionType
onSuccess成功的回调
onFailure失败的回调

◆ setBasicFaceBeauty:whiteningLevel:smoothnessLevel:

- (void) setBasicFaceBeauty: (BOOL)  enable
whiteningLevel: (float)  whiteningLevel
smoothnessLevel: (float)  smoothnessLevel 

设置基础美颜

Parameters
enable基础美颜开关
whiteningLevel美白等级[0-1.0]
smoothnessLevel磨皮等级[0-1.0]

◆ setBypassLiveLayout:userIDs:onSuccess:onFailure:

- (void) setBypassLiveLayout: (AIRBRTCBypassLiveLayoutType)  type
userIDs: (NSArray< NSString * > *_Nonnull)  userIDs
onSuccess: (void(^)(void))  onSuccess
onFailure: (void(^)(NSString *error))  onFailure 

设置预设的旁路推流的布局

Parameters
type预设的布局样式
userIDs要展示的用户ID列表:从左上到右下依次排序
onSuccess成功的回调
onFailure失败的回调

◆ setConfig:

- (void) setConfig: (AIRBRTCConfig *)  config

RTC配置,具体见AIRBRTCConfig

Note
在joinChannel之前配置

◆ setCustomBypassLiveLayout:onSuccess:onFailure:

- (void) setCustomBypassLiveLayout: (NSArray< AIRBRTCBypassLiveLayoutPeerVideoModel * > *)  peerModels
onSuccess: (void(^)(void))  onSuccess
onFailure: (void(^)(NSString *error))  onFailure 

设置自定义的旁路推流的布局(在开启旁路推流成功之后调用)

Parameters
peerModels要展示的视频流,具体见AIRBRTCBypassLiveLayoutPeerVideoModel
onSuccess成功的回调
onFailure失败的回调

◆ startBypassLiveStreaming:

- (void) startBypassLiveStreaming: (AIRBRTCBypassLiveResolutionType)  resolutionType

开启旁路直播推流

Parameters
resolutionType旁路直播分辨率类型,具体见AIRBRTCBypassLiveResolutionType
Note
旧版本中命名为startPublishingBypassLive

◆ startRecording:onSuccess:onFailure:

- (void) startRecording: (AIRBRTCBypassLiveResolutionType)  resolutionType
onSuccess: (void(^)(void))  onSuccess
onFailure: (void(^)(NSString *error))  onFailure 

开始录制

Parameters
resolutionType录制分辨率类型,具体见AIRBRTCBypassLiveResolutionType
onSuccess成功的回调
onFailure失败的回调

◆ startScreenShare:

- (int) startScreenShare: (NSString *)  appGroup

开启屏幕分享

Parameters
appGroup插件和宿主app约定使用相同的appGroup
Returns
0: 成功;其他: 失败

◆ stopBypassLiveStreaming:

- (void) stopBypassLiveStreaming: (BOOL)  destroy

停止旁路直播推流

Parameters
destroyYES表示结束旁路直播,NO表示只停止推流不结束直播

◆ stopRecordingOnSuccess:onFailure:

- (void) stopRecordingOnSuccess: (void(^)(void))  onSuccess
onFailure: (void(^)(NSString *error))  onFailure 

停止录制

Parameters
onSuccess成功的回调
onFailure失败的回调

◆ stopScreenShare

- (int) stopScreenShare

停止屏幕分享

Returns
0: 成功;其他: 失败

◆ subscribeRemoteAudioStream:fromUser:

- (void) subscribeRemoteAudioStream: (BOOL)  sub
fromUser: (NSString *)  userID 

订阅/取消订阅音频流

Parameters
subYES为订阅,NO为取消订阅
userID要订阅的用户userID
Note
默认订阅全部音频

◆ subscribeRemoteScreenShareStream:fromUser:

- (void) subscribeRemoteScreenShareStream: (BOOL)  sub
fromUser: (NSString *)  userID 

订阅/取消订阅屏幕分享流

Parameters
subYES为订阅,NO为取消订阅
userID要订阅的用户userID

◆ subscribeRemoteVideoStream:type:fromUser:

- (void) subscribeRemoteVideoStream: (BOOL)  sub
type: (AIRBRTCVideoStreamType)  type
fromUser: (NSString *)  userID 

订阅/取消订阅视频流

Parameters
subYES为订阅,NO为取消订阅
type视频流类型,具体见AIRBRTCVideoStreamType
userID要订阅的用户userID

◆ toggleLocalCamera

- (void) toggleLocalCamera

切换前后摄像头

Property Documentation

◆ delegate

- (id<AIRBRTCDelegate>) delegate
readwritenonatomicweak

用来接收RTC相关的事件和错误

◆ previewMirrorEnabled

- (BOOL) previewMirrorEnabled
readwritenonatomicassign

是否开启本地相机预览镜像,默认为是

Note
仅对前置摄像头画面生效

◆ rtcLocalView

- (UIView*) rtcLocalView
readwritenonatomicstrong

摄像头本地预览画面view

◆ videoStreamMirrorEnabled

- (BOOL) videoStreamMirrorEnabled
readwritenonatomicassign

是否开启相机流镜像,默认为否

Note
仅对前置摄像头画面生效

The documentation for this protocol was generated from the following file: