NERTC iOS SDK V5.8.10
载入中...
搜索中...
未找到
INERtcChannel.h
浏览该文件的文档.
1//
2// INERtcChannel.h
3// NERtcSDK
4//
5// Created by yuan on 2021/6/6.
6// Copyright © 2021 Netease. All rights reserved.
7//
8
9#ifndef INERtcChannel_h
10#define INERtcChannel_h
11
12#import <Foundation/Foundation.h>
15#import "INERtcEngine.h"
16
17#pragma clang diagnostic push
18#pragma clang diagnostic ignored "-Wdocumentation"
19
20NS_ASSUME_NONNULL_BEGIN
21
32@protocol INERtcChannel <NSObject>
33
44- (int)destroy;
45
60- (int)setChannelDelegate:(nullable id<NERtcChannelDelegate>)channelDelegate;
61
73- (int)setDelegateQueue:(nullable dispatch_queue_t)delegateQueue;
74
91- (NSString *)getChannelName;
92
105- (NERtcConnectionStateType)connectionState;
106
178- (int)joinChannelWithToken:(NSString *)token
179 completion:(NERtcJoinChannelCompletion)completion;
180
257- (int)joinChannelWithToken:(NSString *)token
258 myUid:(uint64_t)uId
259 completion:(NERtcJoinChannelCompletion)completion;
260
337- (int)joinChannelWithToken:(NSString *)token
338 myUid:(uint64_t)uId
339 channelOptions:(nullable NERtcJoinChannelOptions *)channelOptions
340 completion:(void(^)(NSError * _Nullable error, uint64_t channelId, uint64_t elapesd, uint64_t uid, NERtcJoinChannelExtraInfo * _Nullable info))completion;
370- (int)leaveChannel;
371
431- (int)enableLocalAudio:(BOOL)enabled;
432
484- (int)enableLocalVideo:(BOOL)enabled;
485
540- (int)enableLocalVideo:(BOOL)enabled streamType:(NERtcStreamChannelType)streamType;
541
583- (int)enableMediaPub:(BOOL)enabled withMediaType:(NERtcMediaPubType)mediaType;
584
633- (int)enableDualStreamMode:(BOOL)enable;
634
671- (int)setVideoStreamLayerCount:(NERtcVideoStreamLayerCount)layerCount;
672
728- (int)setCameraCaptureConfig:(NERtcCameraCaptureConfiguration *)config;
729
779- (int)setCameraCaptureConfig:(NERtcCameraCaptureConfiguration *)config streamType:(NERtcStreamChannelType)streamType;
780
840- (int)setLocalVideoConfig:(NERtcVideoEncodeConfiguration *)config;
841
904- (int)setLocalVideoConfig:(NERtcVideoEncodeConfiguration *)config streamType:(NERtcStreamChannelType)streamType;
905
920 - (int)switchCamera;
921
936- (int)switchCameraWithPosition:(NERtcCameraPosition)position;
937
995- (int)subscribeRemoteAudio:(BOOL)subscribe forUserID:(uint64_t)userID;
996
1045- (int)subscribeAllRemoteAudio:(BOOL)subscribe;
1046
1075- (int)setAudioSubscribeOnlyBy:(NSArray<NSNumber*> *)uidArray;
1076
1126- (int)muteLocalAudio:(BOOL)muted;
1127
1162- (int)enableAudioVolumeIndication:(BOOL)enable interval:(uint64_t)interval vad:(BOOL)enableVad;
1163
1214- (int)setupLocalVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas;
1215
1257- (int)setLocalRenderScaleMode:(NERtcVideoRenderScaleMode)mode;
1258
1320- (int)setupRemoteVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas forUserID:(uint64_t)userID;
1321
1389- (int)setupRemoteVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas forUserID:(uint64_t)userID streamType:(NERtcStreamChannelType)streamType;
1390
1440- (int)setRemoteRenderScaleMode:(NERtcVideoRenderScaleMode)mode forUserID:(uint64_t)userID;
1441
1504- (int)subscribeRemoteVideo:(BOOL)subscribe forUserID:(uint64_t)userID streamType:(NERtcRemoteVideoStreamType)streamType;
1505
1566- (int)subscribeRemoteVideo:(BOOL)subscribe forUserID:(uint64_t)userID streamType:(NERtcStreamChannelType)streamType subscribeType:(NERtcRemoteVideoStreamType)subscribeType;
1567
1620- (int)muteLocalVideo:(BOOL)muted;
1621
1672- (int)muteLocalVideo:(BOOL)muted streamType:(NERtcStreamChannelType)streamType;
1673
1743- (int)setExternalVideoSource:(BOOL)enable streamType:(NERtcStreamChannelType)streamType;
1744
1760- (int)pushExternalVideoFrame:(NERtcVideoFrame*)frame streamType:(NERtcStreamChannelType)streamType;
1761
1820- (int)setClientRole:(NERtcClientRole)role;
1821
1878- (int)adjustUserPlaybackSignalVolume:(uint32_t)volume forUserID:(uint64_t)userID;
1879
1915- (int)adjustChannelPlaybackSignalVolume:(uint32_t)volume;
1916
1917#pragma mark - Audio Sub Stream
1918
1943- (int)enableLocalSubStreamAudio:(BOOL)enabled;
1944
2000- (int)subscribeRemoteSubStreamAudio:(BOOL)subscribe forUserID:(uint64_t)userID;
2001
2026- (int)muteLocalSubStreamAudio:(BOOL)muted;
2027
2028
2029#pragma mark - Sub Stream
2030
2079- (int)setupLocalSubStreamVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas;
2080
2131- (int)startScreenCapture:(NERtcVideoSubStreamEncodeConfiguration *)config;
2132
2161- (int)stopScreenCapture;
2162
2209- (int)setLocalRenderSubStreamScaleMode:(NERtcVideoRenderScaleMode)mode;
2210
2275- (int)setupRemoteSubStreamVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas forUserID:(uint64_t)userID;
2276
2331- (int)subscribeRemoteSubStreamVideo:(BOOL)subscribe forUserID:(uint64_t)userID;
2332
2384- (int)setRemoteRenderSubStreamVideoScaleMode:(NERtcVideoRenderScaleMode)mode forUserID:(uint64_t)userID;
2385
2420- (int)setRemoteHighPriorityAudioStream:(BOOL)enable forUserID:(uint64_t)userID streamType:(NERtcAudioStreamType)streamType;
2421
2422#pragma mark - 3D Audio
2423
2432- (int)setRangeAudioMode:(NERtcRangeAudioMode)mode;
2433
2442-(int)setRangeAudioTeamID:(int32_t)teamId;
2443
2455- (int)setAudioRecvRange:(int)audibleDistance conversationalDistance:(int)conversationalDistance rollOff:(NERtcDistanceRolloffModel)rollOff;
2456
2493- (int)updateSelfPosition:(NERtcPositionInfo *)info;
2494
2507- (int)enableSpatializerRoomEffects:(BOOL)enabled;
2508
2521- (int)setSpatializerRoomProperty:(NERtcSpatializerRoomProperty *)roomProperty;
2522
2535- (int)setSpatializerRenderMode:(NERtcSpatializerRenderMode)mode;
2536
2544- (int)initSpatializer;
2545
2560- (int)enableSpatializer:(BOOL)enabled applyToTeam:(BOOL)applyToTeam;
2561
2562#pragma mark - ASL black and white list
2578- (int)setSubscribeAudioBlocklist:(NERtcAudioStreamType)type uidArray:(NSArray<NSNumber*> *)uidArray;
2579
2594- (int)setSubscribeAudioAllowlist:(NSArray<NSNumber*> *)uidArray;
2595
2596#pragma mark - Snapshot
2625- (int)takeLocalSnapshot:(NERtcStreamChannelType)streamType callback:(NERtcTakeSnapshotCallback)callback;
2626
2655- (int)takeRemoteSnapshot:(NERtcStreamChannelType)streamType forUserID:(uint64_t)userID callback:(NERtcTakeSnapshotCallback)callback;
2656
2657#pragma mark - SEI
2658
2697- (int)sendSEIMsg:(NSData *)data streamChannelType:(NERtcStreamChannelType)type;
2698
2735- (int)sendSEIMsg:(NSData *)data;
2736
2737#pragma mark - Live Stream
2738
2798- (int)addLiveStreamTask:(NERtcLiveStreamTaskInfo *)taskInfo compeltion:(NERtcLiveStreamCompletion)completion;
2799
2854- (int)updateLiveStreamTask:(NERtcLiveStreamTaskInfo *)taskInfo compeltion:(NERtcLiveStreamCompletion)completion;
2855
2910- (int)removeLiveStreamTask:(NSString *)taskId compeltion:(NERtcLiveStreamCompletion)completion;
2911
2926- (int)addChannelMediaStatsObserver:(id<NERtcChannelMediaStatsObserver>)observer;
2927
2942- (int)removeChannelMediaStatsObserver:(id<NERtcChannelMediaStatsObserver>)observer;
2943
2956- (int)cleanupChannelMediaStatsObserver;
2957
2958
2987- (int)startChannelMediaRelay:(NERtcChannelMediaRelayConfiguration *_Nonnull)config;
2988
3015- (int)updateChannelMediaRelay:(NERtcChannelMediaRelayConfiguration *_Nonnull)config;
3016
3049- (int)stopChannelMediaRelay;
3050
3101- (int)setLocalMediaPriority:(NERtcMediaPriorityType)priority preemptive:(BOOL)preemptive;
3102
3103
3128- (int)setLocalPublishFallbackOption:(NERtcStreamFallbackOptions)option;
3129
3154- (int)setRemoteSubscribeFallbackOption:(NERtcStreamFallbackOptions)option;
3155
3194- (int)updatePermissionKey:(NSString *)key;
3195
3196#pragma mark - Other
3197
3207- (int)reportCustomEvent:(NSString *)eventName
3208 customIdentify:(NSString *)customIdentify
3209 param:(NSDictionary *)param;
3210
3211@end
3212
3213NS_ASSUME_NONNULL_END
3214
3215#pragma clang diagnostic pop
3216
3217#endif /* INERtcChannel_h */
void(^ NERtcTakeSnapshotCallback)(int errorCode, UIImage *_Nullable image)
截图结果 block 回调。
定义 INERtcEngine.h:64
void(^ NERtcJoinChannelCompletion)(NSError *_Nullable error, uint64_t channelId, uint64_t elapesd, uint64_t uid)
加入房间 block。
定义 INERtcEngine.h:36
void(^ NERtcLiveStreamCompletion)(NSString *taskId, kNERtcLiveStreamError errorCode)
互动直播推流 block。
定义 INERtcEngine.h:50
NERtcMediaPubType
媒体 pub 类型。
定义 NERtcEngineEnum.h:235
NERtcVideoStreamLayerCount
定义 NERtcEngineEnum.h:504
NERtcSpatializerRenderMode
空间音效渲染模式
定义 NERtcEngineEnum.h:1976
NERtcDistanceRolloffModel
空间音效衰减模式
定义 NERtcEngineEnum.h:2002
NERtcConnectionStateType
当前房间的连接状态。
定义 NERtcEngineEnum.h:45
NERtcCameraPosition
指定的摄像头位置。
定义 NERtcEngineEnum.h:1460
NERtcRemoteVideoStreamType
远端视频流类型。
定义 NERtcEngineEnum.h:709
NERtcStreamFallbackOptions
定义 NERtcEngineEnum.h:2063
NERtcRangeAudioMode
定义 NERtcEngineEnum.h:2021
NERtcClientRole
用户角色。
定义 NERtcEngineEnum.h:206
NERtcStreamChannelType
SEI 发送的流通道类型。
定义 NERtcEngineEnum.h:1125
NERtcVideoRenderScaleMode
视频渲染缩放模式。
定义 NERtcEngineEnum.h:794
NERtcMediaPriorityType
定义 NERtcEngineEnum.h:2042
NERtcAudioStreamType
音频流类型,目前同时支持音频两路流:主流和辅流
定义 NERtcEngineEnum.h:1818
摄像头采集配置。
定义 NERtcEngineBase.h:491
定义 NERtcEngineBase.h:1756
joinChannel 回调时的一些可选信息
定义 NERtcEngineBase.h:2784
joinChannel 时的一些可选信息
定义 NERtcEngineBase.h:2763
直播推流任务的配置。
定义 NERtcEngineBase.h:1311
3D 音效算法中坐标信息。
定义 NERtcEngineBase.h:3003
3D 音效房间属性设置。
定义 NERtcEngineBase.h:3079
视频画布设置。
定义 NERtcEngineBase.h:299
本地视频发送配置
定义 NERtcEngineBase.h:545
视频帧信息。
定义 NERtcEngineBase.h:1612
本地辅流发送配置。
定义 NERtcEngineBase.h:651