NERtc iOS SDK  V4.6.0
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 
206 - (void)onNERtcChannelUserVideoDidStartWithUserID:(uint64_t)userID videoProfile:(NERtcVideoProfileType)profile;
207 
223 - (void)onNERtcChannelUserVideoDidStop:(uint64_t)userID;
224 
241 - (void)onNERtcChannelUserSubStreamDidStartWithUserID:(uint64_t)userID subStreamProfile:(NERtcVideoProfileType)profile;
242 
257 - (void)onNERtcChannelUserSubStreamDidStop:(uint64_t)userID;
258 
278 - (void)onNERtcChannelUser:(uint64_t)userID videoMuted:(BOOL)muted;
279 
298 - (void)onNERtcChannelDidDisconnectWithReason:(NERtcError)reason;
299 
313 
328 - (void)onNERtcChannelRejoinChannel:(NERtcError)result;
329 
342 - (void)onNERtcChannelFirstAudioDataDidReceiveWithUserID:(uint64_t)userID;
343 
360 - (void)onNERtcChannelFirstVideoDataDidReceiveWithUserID:(uint64_t)userID;
361 
374 - (void)onNERtcChannelFirstAudioFrameDecoded:(uint64_t)userID;
375 
396 - (void)onNERtcChannelFirstVideoFrameDecoded:(uint64_t)userID width:(uint32_t)width height:(uint32_t)height;
397 
398 
417 - (void)onNERtcChannelRecvSEIMsg:(uint64_t)userID message:(NSData *)message;
418 
419 
436 - (void)onNERtcChannelLiveStreamState:(NERtcLiveStreamStateCode)state taskID:(NSString *)taskID url:(NSString *)url;
437 
438 
457 - (void)onLocalAudioVolumeIndication:(int)volume;
458 
459 
484 - (void)onRemoteAudioVolumeIndication:(nullable NSArray<NERtcAudioVolumeInfo*> *)speakers totalVolume:(int)totalVolume;
485 
486 
507 - (void)onNERtcChannelLocalPublishFallbackToAudioOnly:(BOOL)isFallback streamType:(NERtcStreamChannelType)streamType;
508 
531 - (void)onNERtcChannelRemoteSubscribeFallbackToAudioOnly:(uint64_t)uid isFallback:(BOOL)isFallback streamType:(NERtcStreamChannelType)streamType;
532 
549 - (void)onNERtcChannelDidError:(NERtcError)errCode;
550 
554 - (void)onNERtcChannelMediaRightChangeWithAudio:(BOOL)isAudioBannedByServer
555  video:(BOOL)isVideoBannedByServer;
574 - (void)onNERtcChannelDidWarning:(NERtcWarning)warnCode msg:(NSString *)msg;
575 
590 - (void)onNERtcChannelMediaRelayStateDidChange:(NERtcChannelMediaRelayState)state channelName:(NSString *)channelName;
591 
608 - (void)onNERtcChannelDidReceiveChannelMediaRelayEvent:(NERtcChannelMediaRelayEvent)event channelName:(NSString *)channelName error:(NERtcError)error;
609 
610 @end
611 
612 NS_ASSUME_NONNULL_END
NERtcChannelMediaRelayEvent
媒体流转发回调事件
Definition: NERtcEngineEnum.h:2631
NERtcChannelMediaRelayState
媒体流转发状态
Definition: NERtcEngineEnum.h:2584
NERtcSessionLeaveReason
用户离开房间的原因。
Definition: NERtcEngineEnum.h:107
NERtcConnectionStateType
当前房间的连接状态。
Definition: NERtcEngineEnum.h:31
NERtcVideoProfileType
视频 profile 类型。
Definition: NERtcEngineEnum.h:361
NERtcClientRole
用户角色。
Definition: NERtcEngineEnum.h:163
NERtcStreamChannelType
SEI发送的流通道类型。
Definition: NERtcEngineEnum.h:1013
NERtcLiveStreamStateCode
直播推流状态。
Definition: NERtcEngineEnum.h:2256
NERtcReasonConnectionChangedType
当前engine连接状态变更的原因。
Definition: NERtcEngineEnum.h:192
NERtcError
Engine Error Code。
Definition: NERtcEngineErrorCode.h:17
NERtcWarning
Definition: NERtcEngineErrorCode.h:556
声音音量信息。
Definition: NERtcEngineBase.h:1411
NERtcChannelDelegate 类监听和报告指定房间的事件和数据。
Definition: NERtcChannelDelegate.h:27
void onNERtcChannelReconnectingStart()
重连开始回调。 客户端和服务器断开连接时,SDK 会进行重连,重连开始时触发此回调。重连结果请参考 onNERtcEngineRejoinChannel 、onNERtcEngineDidDiscon...