NERtc iOS SDK  V4.6.20
NERtcChannelDelegate.h
浏览该文件的文档.
1 //
2 // NERtcChannelDelegate.h
3 // NERtcSDK
4 //
5 // Created by yuan on 2021/5/27.
6 // Copyright © 2021 Netease. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "NERtcEngineErrorCode.h"
11 #import "NERtcEngineEnum.h"
12 #import "NERtcEngineBase.h"
13 
14 
15 NS_ASSUME_NONNULL_BEGIN
16 
27 @protocol NERtcChannelDelegate <NSObject>
28 
29 @optional
30 
47 - (void)onNERtcChannelConnectionStateChangeWithState:(NERtcConnectionStateType)state
48  reason:(NERtcReasonConnectionChangedType)reason;
49 
64 - (void)onNERtcChannelDidLeaveChannelWithResult:(NERtcError)result;
65 
95 - (void)onNERtcChannelUserDidJoinWithUserID:(uint64_t)userID userName:(NSString *)userName;
96 
117 - (void)onNERtcChannelUserDidLeaveWithUserID:(uint64_t)userID reason:(NERtcSessionLeaveReason)reason;
118 
140 - (void)onNERtcChannelDidClientRoleChanged:(NERtcClientRole)oldRole newRole:(NERtcClientRole)newRole;
141 
155 - (void)onNERtcChannelUserAudioDidStart:(uint64_t)userID;
156 
170 - (void)onNERtcChannelUserAudioDidStop:(uint64_t)userID;
171 
187 - (void)onNERtcChannelUser:(uint64_t)userID audioMuted:(BOOL)muted;
188 
201 - (void)onNERtcChannelUserSubStreamAudioDidStart:(uint64_t)userID;
202 
215 - (void)onNERtcChannelUserSubStreamAudioDidStop:(uint64_t)userID;
216 
235 - (void)onNERtcChannelUser:(uint64_t)userID subStreamAudioMuted:(BOOL)muted;
236 
254 - (void)onNERtcChannelUserVideoDidStartWithUserID:(uint64_t)userID videoProfile:(NERtcVideoProfileType)profile;
255 
271 - (void)onNERtcChannelUserVideoDidStop:(uint64_t)userID;
272 
289 - (void)onNERtcChannelUserSubStreamDidStartWithUserID:(uint64_t)userID subStreamProfile:(NERtcVideoProfileType)profile;
290 
305 - (void)onNERtcChannelUserSubStreamDidStop:(uint64_t)userID;
306 
326 - (void)onNERtcChannelUser:(uint64_t)userID videoMuted:(BOOL)muted;
327 
349 - (void)onNERtcChannelUser:(uint64_t)userID videoMuted:(BOOL)muted streamType:(NERtcStreamChannelType)streamType;
350 
369 - (void)onNERtcChannelDidDisconnectWithReason:(NERtcError)reason;
370 
384 
399 - (void)onNERtcChannelRejoinChannel:(NERtcError)result;
400 
413 - (void)onNERtcChannelFirstAudioDataDidReceiveWithUserID:(uint64_t)userID;
414 
431 - (void)onNERtcChannelFirstVideoDataDidReceiveWithUserID:(uint64_t)userID;
432 
443 - (void)onNERtcChannelFirstVideoDataDidReceiveWithUserID:(uint64_t)userID streamType:(NERtcStreamChannelType)type;
456 - (void)onNERtcChannelFirstAudioFrameDecoded:(uint64_t)userID;
457 
478 - (void)onNERtcChannelFirstVideoFrameDecoded:(uint64_t)userID width:(uint32_t)width height:(uint32_t)height;
479 
492 - (void)onNERtcChannelFirstVideoFrameDecoded:(uint64_t)userID width:(uint32_t)width height:(uint32_t)height streamType:(NERtcStreamChannelType)type;
493 
512 - (void)onNERtcChannelRecvSEIMsg:(uint64_t)userID message:(NSData *)message;
513 
514 
531 - (void)onNERtcChannelLiveStreamState:(NERtcLiveStreamStateCode)state taskID:(NSString *)taskID url:(NSString *)url;
532 
533 
552 - (void)onLocalAudioVolumeIndication:(int)volume;
553 
572 - (void)onLocalAudioVolumeIndication:(int)volume withVad:(BOOL)enableVad;
573 
574 
599 - (void)onRemoteAudioVolumeIndication:(nullable NSArray<NERtcAudioVolumeInfo*> *)speakers totalVolume:(int)totalVolume;
600 
601 
622 - (void)onNERtcChannelLocalPublishFallbackToAudioOnly:(BOOL)isFallback streamType:(NERtcStreamChannelType)streamType;
623 
646 - (void)onNERtcChannelRemoteSubscribeFallbackToAudioOnly:(uint64_t)uid isFallback:(BOOL)isFallback streamType:(NERtcStreamChannelType)streamType;
647 
664 - (void)onNERtcChannelDidError:(NERtcError)errCode;
665 
669 - (void)onNERtcChannelMediaRightChangeWithAudio:(BOOL)isAudioBannedByServer
670  video:(BOOL)isVideoBannedByServer;
689 - (void)onNERtcChannelDidWarning:(NERtcWarning)warnCode msg:(NSString *)msg;
690 
705 - (void)onNERtcChannelMediaRelayStateDidChange:(NERtcChannelMediaRelayState)state channelName:(NSString *)channelName;
706 
723 - (void)onNERtcChannelDidReceiveChannelMediaRelayEvent:(NERtcChannelMediaRelayEvent)event channelName:(NSString *)channelName error:(NERtcError)error;
724 
725 @end
726 
727 NS_ASSUME_NONNULL_END
NERtcChannelMediaRelayEvent
媒体流转发回调事件
Definition: NERtcEngineEnum.h:2945
NERtcChannelMediaRelayState
媒体流转发状态
Definition: NERtcEngineEnum.h:2898
NERtcSessionLeaveReason
用户离开房间的原因。
Definition: NERtcEngineEnum.h:121
NERtcConnectionStateType
当前房间的连接状态。
Definition: NERtcEngineEnum.h:45
NERtcVideoProfileType
视频 profile 类型。
Definition: NERtcEngineEnum.h:357
NERtcClientRole
用户角色。
Definition: NERtcEngineEnum.h:177
NERtcStreamChannelType
SEI发送的流通道类型。
Definition: NERtcEngineEnum.h:998
NERtcLiveStreamStateCode
直播推流状态。
Definition: NERtcEngineEnum.h:2570
NERtcReasonConnectionChangedType
当前engine连接状态变更的原因。
Definition: NERtcEngineEnum.h:226
NERtcError
Engine Error Code。
Definition: NERtcEngineErrorCode.h:17
NERtcWarning
Definition: NERtcEngineErrorCode.h:568
声音音量信息。
Definition: NERtcEngineBase.h:1473
NERtcChannelDelegate 类监听和报告指定房间的事件和数据。
Definition: NERtcChannelDelegate.h:27
void onNERtcChannelReconnectingStart()
重连开始回调。 客户端和服务器断开连接时,SDK 会进行重连,重连开始时触发此回调。重连结果请参考 onNERtcEngineRejoinChannel 、onNERtcEngineDidDiscon...