NIMNetCallManagerDelegate Protocol Reference

Conforms to NSObject
Declared in NIMNetCallManagerProtocol.h

Overview

音视频聊天相关回调

– onReceive:from:type:message:

被叫收到呼叫(振铃)

- (void)onReceive:(UInt64)callID from:(NSString *)caller type:(NIMNetCallMediaType)type message:(nullable NSString *)extendMessage

Parameters

callID

call id

caller

主叫帐号

type

呼叫类型

extendMessage

扩展消息, 透传主叫发起通话时携带的该信息

Discussion

被叫收到呼叫(振铃)

Declared In

NIMNetCallManagerProtocol.h

– onResponse:from:accepted:

主叫收到被叫响应

- (void)onResponse:(UInt64)callID from:(NSString *)callee accepted:(BOOL)accepted

Parameters

callID

call id

callee

被叫帐号

accepted

是否接听

Discussion

主叫收到被叫响应

Declared In

NIMNetCallManagerProtocol.h

– onHangup:by:

对方挂断电话

- (void)onHangup:(UInt64)callID by:(NSString *)user

Parameters

callID

call id

user

对方帐号

Discussion

对方挂断电话

Declared In

NIMNetCallManagerProtocol.h

– onResponsedByOther:accepted:

这通呼入通话已经被该帐号其他端处理

- (void)onResponsedByOther:(UInt64)callID accepted:(BOOL)accepted

Parameters

callID

呼入通话的call id

accepted

是否被接听

Discussion

这通呼入通话已经被该帐号其他端处理

Declared In

NIMNetCallManagerProtocol.h

– onCallEstablished:

点对点通话建立成功

- (void)onCallEstablished:(UInt64)callID

Parameters

callID

call id

Discussion

点对点通话建立成功

Declared In

NIMNetCallManagerProtocol.h

– onCallDisconnected:withError:

通话异常断开

- (void)onCallDisconnected:(UInt64)callID withError:(nullable NSError *)error

Parameters

callID

call id

error

断开的原因,如果是 nil 表示正常退出

Discussion

通话异常断开

Declared In

NIMNetCallManagerProtocol.h

– onControl:from:type:

收到对方网络通话控制信息,用于方便通话双方沟通信息

- (void)onControl:(UInt64)callID from:(NSString *)user type:(NIMNetCallControlType)control

Parameters

callID

相关网络通话的call id

user

对方帐号

control

控制类型

Discussion

收到对方网络通话控制信息,用于方便通话双方沟通信息

Declared In

NIMNetCallManagerProtocol.h

– onNetStatus:user:

当前通话网络质量

- (void)onNetStatus:(NIMNetCallNetStatus)status user:(NSString *)user

Parameters

status

网络质量

user

网络质量对应的用户;如果是自己,表示自己的发送网络状态

Discussion

当前通话网络质量

Declared In

NIMNetCallManagerProtocol.h

– onNetStat:user:

当前通话网络状态

- (void)onNetStat:(NIMNetCallNetstat *)stat user:(NSString *)user

Parameters

stat

网络状态

user

网络状态对应的用户;如果是自己,表示自己的发送网络状态

Discussion

当前通话网络状态

Declared In

NIMNetCallManagerProtocol.h

– onLocalDisplayviewReady:

本地摄像头预览就绪

- (void)onLocalDisplayviewReady:(UIView *)displayView

Parameters

displayView

本地摄像头预览层

Discussion

本地摄像头预览就绪

Declared In

NIMNetCallManagerProtocol.h

– onCameraOrientationSwitchCompleted:

本地视频采集方向切换完成回调

- (void)onCameraOrientationSwitchCompleted:(NIMVideoOrientation)orientation

Parameters

orientation

采集方向

Discussion

本地视频采集方向切换完成回调

Declared In

NIMNetCallManagerProtocol.h

– onCameraTypeSwitchCompleted:

摄像头方向切换完成回调

- (void)onCameraTypeSwitchCompleted:(NIMNetCallCamera)cameraType

Parameters

cameraType

摄像头方向

Discussion

摄像头方向切换完成回调

Declared In

NIMNetCallManagerProtocol.h

– onCameraQualitySwitchCompleted:

视频清晰度切换完成回调

- (void)onCameraQualitySwitchCompleted:(NIMNetCallVideoQuality)videoQuality

Parameters

videoQuality

清晰度

Discussion

视频清晰度切换完成回调

Declared In

NIMNetCallManagerProtocol.h

– onRemoteDisplayviewReady:user:

远端渲染就绪

- (void)onRemoteDisplayviewReady:(UIView *)displayView user:(NSString *)user

Parameters

displayView

远端视频预览层

Discussion

远端渲染就绪

Declared In

NIMNetCallManagerProtocol.h

– onRemoteYUVReady:width:height:from:

远程视频YUV数据就绪

- (void)onRemoteYUVReady:(NSData *)yuvData width:(NSUInteger)width height:(NSUInteger)height from:(NSString *)user

Parameters

yuvData

远程视频YUV数据, 紧凑型 (stride 等于 width)

width

远程视频画面宽度

height

远程视频画面长度

user

远程视频画面属于的用户

Discussion

远程视频YUV数据就绪

将YUV数据直接渲染在OpenGL上比UIImageView贴图占用更少的cpu

Declared In

NIMNetCallManagerProtocol.h

– onRemoteVideo:from:

远程视频 SampleBuffer 数据就绪

- (void)onRemoteVideo:(CMSampleBufferRef)sampleBuffer from:(NSString *)user

Parameters

sampleBuffer

远程视频 SampleBuffer 数据

user

远程视频画面属于的用户

Discussion

远程视频 SampleBuffer 数据就绪

Declared In

NIMNetCallManagerProtocol.h

– onRemoteImageReady:

远程视频画面就绪

- (void)onRemoteImageReady:(CGImageRef)image

Parameters

image

远程视频画面

Discussion

远程视频画面就绪

如果你已经使用onRemoteYUVReady:width:height:得到的YUV数据渲染画面, 不要实现该委托以优化性能

Declared In

NIMNetCallManagerProtocol.h

– onRecordStarted:fileURL:uid:

录制成功开始

- (void)onRecordStarted:(UInt64)callID fileURL:(NSURL *)fileURL uid:(NSString *)userId

Parameters

callID

录制的相关网络通话的call id

fileURL

录制的文件路径

userId

录制用户对象的id

Discussion

录制成功开始

Declared In

NIMNetCallManagerProtocol.h

– onRecordError:callID:uid:

录制发生了错误

- (void)onRecordError:(NSError *)error callID:(UInt64)callID uid:(NSString *)userId

Parameters

error

错误

callID

录制错误相关网络通话的call id

userId

录制用户对象的id

Discussion

录制发生了错误

Declared In

NIMNetCallManagerProtocol.h

– onRecordStopped:fileURL:uid:

录制成功结束

- (void)onRecordStopped:(UInt64)callID fileURL:(NSURL *)fileURL uid:(NSString *)userId

Parameters

callID

录制的相关网络通话的call id

fileURL

录制的文件路径

userId

录制用户对象的id

Discussion

录制成功结束

Declared In

NIMNetCallManagerProtocol.h

– onNetCallRecordingInfo:

网络通话服务器录制信息

- (void)onNetCallRecordingInfo:(NIMNetCallRecordingInfo *)info

Parameters

info

录制信息

Discussion

网络通话服务器录制信息

Declared In

NIMNetCallManagerProtocol.h

– onUserJoined:meeting:

用户加入了多人会议

- (void)onUserJoined:(NSString *)uid meeting:(NIMNetCallMeeting *)meeting

Parameters

uid

用户 id

meeting

用户加入的会议

Discussion

用户加入了多人会议

Declared In

NIMNetCallManagerProtocol.h

– onUserLeft:meeting:

用户离开了多人会议

- (void)onUserLeft:(NSString *)uid meeting:(NIMNetCallMeeting *)meeting

Parameters

uid

用户 id

meeting

用户离开的会议

Discussion

用户离开了多人会议

Declared In

NIMNetCallManagerProtocol.h

– onMeetingError:meeting:

会议发生了错误

- (void)onMeetingError:(NSError *)error meeting:(NIMNetCallMeeting *)meeting

Parameters

error

错误信息

meeting

发生错误的会议

Discussion

会议发生了错误

Declared In

NIMNetCallManagerProtocol.h

– onMyVolumeUpdate:

自己当前音量

- (void)onMyVolumeUpdate:(UInt16)volume

Parameters

volume

音量

Discussion

自己当前音量

Declared In

NIMNetCallManagerProtocol.h

– onSpeakingUsersReport:

正在说话的用户信息汇报

- (void)onSpeakingUsersReport:(nullable NSArray<NIMNetCallUserInfo*> *)report

Parameters

report

用户信息,包含音量,如果为空,表示没有说话的人

Discussion

正在说话的用户信息汇报

Declared In

NIMNetCallManagerProtocol.h

– onAudioMixTaskCompleted

当前语音文件混音任务完成回调

- (void)onAudioMixTaskCompleted

Discussion

当前语音文件混音任务完成回调

Declared In

NIMNetCallManagerProtocol.h

– onSoundEffectPlayCompleted

当前音效播放完成回调

- (void)onSoundEffectPlayCompleted

Discussion

当前音效播放完成回调

Declared In

NIMNetCallManagerProtocol.h

– onBypassStreamingStatus:

互动直播状态回调

- (void)onBypassStreamingStatus:(NIMBypassStreamingStatus)code

Parameters

code

互动直播状态码

Discussion

互动直播状态回调

Declared In

NIMNetCallManagerProtocol.h

– onCameraRunning:

摄像头开关状态回调

- (void)onCameraRunning:(BOOL)running

Parameters

running

开启状态

Discussion

摄像头开关状态回调

Declared In

NIMNetCallManagerProtocol.h

– onKicked

自己被踢回调

- (void)onKicked

Discussion

自己被踢回调

Declared In

NIMNetCallManagerProtocol.h

– onResourceFreed

资源释放完毕通知

- (void)onResourceFreed

Discussion

资源释放完毕通知

Declared In

NIMNetCallManagerProtocol.h

– onAudioDeviceCaptureAbnormal

音频采集异常通知

- (void)onAudioDeviceCaptureAbnormal

Discussion

音频采集异常通知

Declared In

NIMNetCallManagerProtocol.h

– onAudioDeviceCaptureRecover

音频采集异常恢复通知

- (void)onAudioDeviceCaptureRecover

Discussion

音频采集异常恢复通知

Declared In

NIMNetCallManagerProtocol.h

– onAudioExternalDeviceStateChanged:

音频外部播放设备状态回调

- (void)onAudioExternalDeviceStateChanged:(NIMNetCallAudioExternalDeviceStatus)status

Parameters

status

状态

@discussions 播放设备可能有耳机,音箱。希望上层实现一个设备列表让用户选择插入的设备类型。

Discussion

音频外部播放设备状态回调

Declared In

NIMNetCallManagerProtocol.h

– onSessionTimeDuration:

会话时长

- (void)onSessionTimeDuration:(UInt64)timeDuration

Parameters

timeDuration

时长 单位:毫秒

Discussion

会话时长

Declared In

NIMNetCallManagerProtocol.h

– onProximityMonitoringChange:

近距离传感器触发通知

- (void)onProximityMonitoringChange:(NSNotification *)notification

Parameters

notification

通知内容

Discussion

近距离传感器触发通知

Declared In

NIMNetCallManagerProtocol.h

– onPublishVideoResult:

本端发布视频流回调

- (void)onPublishVideoResult:(int)errCode

Parameters

errCode

0为发布成功,非0为失败

Discussion

本端发布视频流回调

Declared In

NIMNetCallManagerProtocol.h

– onUnPublishVideoResult:

本端取消发布视频流回调

- (void)onUnPublishVideoResult:(int)errCode

Parameters

errCode

0为取消发布成功,非0为失败

Discussion

本端取消发布视频流回调

Declared In

NIMNetCallManagerProtocol.h

– onSubscribeVideoResult:uid:profile:

订阅视频流回调

- (void)onSubscribeVideoResult:(int)errCode uid:(NSString *)uid profile:(NIMNetCallSimulcastProfile)profile

Parameters

errCode

0为订阅成功,非0为失败

uid

用户id

Discussion

订阅视频流回调

Declared In

NIMNetCallManagerProtocol.h

– onUnSubscribeVideoResult:uid:profile:

取消订阅视频流回调

- (void)onUnSubscribeVideoResult:(int)errCode uid:(NSString *)uid profile:(NIMNetCallSimulcastProfile)profile

Parameters

errCode

0为取消订阅成功,非0为失败

uid

用户id

Discussion

取消订阅视频流回调

Declared In

NIMNetCallManagerProtocol.h

– onRemotePublishVideoResult:profileList:

远端发布视频流回调

- (void)onRemotePublishVideoResult:(NSString *)uid profileList:(NSArray *)profileList

Parameters

uid

用户id

Discussion

远端发布视频流回调

Declared In

NIMNetCallManagerProtocol.h

– onRemoteUnPublishVideoResult:

远端取消发布视频流回调

- (void)onRemoteUnPublishVideoResult:(NSString *)uid

Parameters

uid

用户id

Discussion

远端取消发布视频流回调

Declared In

NIMNetCallManagerProtocol.h

– onSubscribeAudioResult:

订阅音频回调

- (void)onSubscribeAudioResult:(int)errCode

Parameters

errCode

0为订阅成功,非0为失败

Discussion

订阅音频回调

Declared In

NIMNetCallManagerProtocol.h

– onUnSubscribeAudioResult:

取消订阅音频回调

- (void)onUnSubscribeAudioResult:(int)errCode

Parameters

errCode

0为取消订阅成功,非0为失败

Discussion

取消订阅音频回调

Declared In

NIMNetCallManagerProtocol.h

– allCallRecordsCleared

所有话单清空

- (void)allCallRecordsCleared

Discussion

所有话单清空

Declared In

NIMNetCallManagerProtocol.h