NERtc iOS SDK V5.6.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
432- (int)enableLocalAudio:(BOOL)enabled;
433
485- (int)enableLocalVideo:(BOOL)enabled;
486
541- (int)enableLocalVideo:(BOOL)enabled streamType:(NERtcStreamChannelType)streamType;
542
583- (int)enableMediaPub:(BOOL)enabled withMediaType:(NERtcMediaPubType)mediaType;
584
632- (int)enableDualStreamMode:(BOOL)enable;
633
689- (int)setCameraCaptureConfig:(NERtcCameraCaptureConfiguration *)config;
690
740- (int)setCameraCaptureConfig:(NERtcCameraCaptureConfiguration *)config streamType:(NERtcStreamChannelType)streamType;
741
801- (int)setLocalVideoConfig:(NERtcVideoEncodeConfiguration *)config;
802
865- (int)setLocalVideoConfig:(NERtcVideoEncodeConfiguration *)config streamType:(NERtcStreamChannelType)streamType;
866
881 - (int)switchCamera;
882
897- (int)switchCameraWithPosition:(NERtcCameraPosition)position;
898
956- (int)subscribeRemoteAudio:(BOOL)subscribe forUserID:(uint64_t)userID;
957
1006- (int)subscribeAllRemoteAudio:(BOOL)subscribe;
1007
1036- (int)setAudioSubscribeOnlyBy:(NSArray<NSNumber*> *)uidArray;
1037
1087- (int)muteLocalAudio:(BOOL)muted;
1088
1123- (int)enableAudioVolumeIndication:(BOOL)enable interval:(uint64_t)interval vad:(BOOL)enableVad;
1124
1175- (int)setupLocalVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas;
1176
1218- (int)setLocalRenderScaleMode:(NERtcVideoRenderScaleMode)mode;
1219
1281- (int)setupRemoteVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas forUserID:(uint64_t)userID;
1282
1332- (int)setRemoteRenderScaleMode:(NERtcVideoRenderScaleMode)mode forUserID:(uint64_t)userID;
1333
1396- (int)subscribeRemoteVideo:(BOOL)subscribe forUserID:(uint64_t)userID streamType:(NERtcRemoteVideoStreamType)streamType;
1397
1450- (int)muteLocalVideo:(BOOL)muted;
1451
1502- (int)muteLocalVideo:(BOOL)muted streamType:(NERtcStreamChannelType)streamType;
1503
1573- (int)setExternalVideoSource:(BOOL)enable streamType:(NERtcStreamChannelType)streamType;
1574
1590- (int)pushExternalVideoFrame:(NERtcVideoFrame*)frame streamType:(NERtcStreamChannelType)streamType;
1591
1650- (int)setClientRole:(NERtcClientRole)role;
1651
1708- (int)adjustUserPlaybackSignalVolume:(uint32_t)volume forUserID:(uint64_t)userID;
1709
1745- (int)adjustChannelPlaybackSignalVolume:(uint32_t)volume;
1746
1747#pragma mark - Audio Sub Stream
1748
1773- (int)enableLocalSubStreamAudio:(BOOL)enabled;
1774
1830- (int)subscribeRemoteSubStreamAudio:(BOOL)subscribe forUserID:(uint64_t)userID;
1831
1856- (int)muteLocalSubStreamAudio:(BOOL)muted;
1857
1858
1859#pragma mark - Sub Stream
1860
1909- (int)setupLocalSubStreamVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas;
1910
1961- (int)startScreenCapture:(NERtcVideoSubStreamEncodeConfiguration *)config;
1962
1991- (int)stopScreenCapture;
1992
2039- (int)setLocalRenderSubStreamScaleMode:(NERtcVideoRenderScaleMode)mode;
2040
2105- (int)setupRemoteSubStreamVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas forUserID:(uint64_t)userID;
2106
2161- (int)subscribeRemoteSubStreamVideo:(BOOL)subscribe forUserID:(uint64_t)userID;
2162
2214- (int)setRemoteRenderSubStreamVideoScaleMode:(NERtcVideoRenderScaleMode)mode forUserID:(uint64_t)userID;
2215
2250- (int)setRemoteHighPriorityAudioStream:(BOOL)enable forUserID:(uint64_t)userID streamType:(NERtcAudioStreamType)streamType;
2251
2252#pragma mark - 3D Audio
2253
2262- (int)setRangeAudioMode:(NERtcRangeAudioMode)mode;
2263
2272-(int)setRangeAudioTeamID:(int32_t)teamId;
2273
2285- (int)setAudioRecvRange:(int)audibleDistance conversationalDistance:(int)conversationalDistance rollOff:(NERtcDistanceRolloffModel)rollOff;
2286
2323- (int)updateSelfPosition:(NERtcPositionInfo *)info;
2324
2337- (int)enableSpatializerRoomEffects:(BOOL)enabled;
2338
2351- (int)setSpatializerRoomProperty:(NERtcSpatializerRoomProperty *)roomProperty;
2352
2365- (int)setSpatializerRenderMode:(NERtcSpatializerRenderMode)mode;
2366
2374- (int)initSpatializer;
2375
2390- (int)enableSpatializer:(BOOL)enabled applyToTeam:(BOOL)applyToTeam;
2391
2392#pragma mark - ASL black and white list
2408- (int)setSubscribeAudioBlocklist:(NERtcAudioStreamType)type uidArray:(NSArray<NSNumber*> *)uidArray;
2409
2424- (int)setSubscribeAudioAllowlist:(NSArray<NSNumber*> *)uidArray;
2425
2426#pragma mark - Snapshot
2455- (int)takeLocalSnapshot:(NERtcStreamChannelType)streamType callback:(NERtcTakeSnapshotCallback)callback;
2456
2485- (int)takeRemoteSnapshot:(NERtcStreamChannelType)streamType forUserID:(uint64_t)userID callback:(NERtcTakeSnapshotCallback)callback;
2486
2487#pragma mark - SEI
2488
2527- (int)sendSEIMsg:(NSData *)data streamChannelType:(NERtcStreamChannelType)type;
2528
2565- (int)sendSEIMsg:(NSData *)data;
2566
2567#pragma mark - Live Stream
2568
2628- (int)addLiveStreamTask:(NERtcLiveStreamTaskInfo *)taskInfo compeltion:(NERtcLiveStreamCompletion)completion;
2629
2684- (int)updateLiveStreamTask:(NERtcLiveStreamTaskInfo *)taskInfo compeltion:(NERtcLiveStreamCompletion)completion;
2685
2740- (int)removeLiveStreamTask:(NSString *)taskId compeltion:(NERtcLiveStreamCompletion)completion;
2741
2756- (int)addChannelMediaStatsObserver:(id<NERtcChannelMediaStatsObserver>)observer;
2757
2772- (int)removeChannelMediaStatsObserver:(id<NERtcChannelMediaStatsObserver>)observer;
2773
2786- (int)cleanupChannelMediaStatsObserver;
2787
2788
2817- (int)startChannelMediaRelay:(NERtcChannelMediaRelayConfiguration *_Nonnull)config;
2818
2845- (int)updateChannelMediaRelay:(NERtcChannelMediaRelayConfiguration *_Nonnull)config;
2846
2879- (int)stopChannelMediaRelay;
2880
2931- (int)setLocalMediaPriority:(NERtcMediaPriorityType)priority preemptive:(BOOL)preemptive;
2932
2933
2958- (int)setLocalPublishFallbackOption:(NERtcStreamFallbackOptions)option;
2959
2984- (int)setRemoteSubscribeFallbackOption:(NERtcStreamFallbackOptions)option;
2985
3024- (int)updatePermissionKey:(NSString *)key;
3025
3026#pragma mark - Other
3027
3037- (int)reportCustomEvent:(NSString *)eventName
3038 customIdentify:(NSString *)customIdentify
3039 param:(NSDictionary *)param;
3040
3041@end
3042
3043NS_ASSUME_NONNULL_END
3044
3045#pragma clang diagnostic pop
3046
3047#endif /* INERtcChannel_h */
void(^ NERtcTakeSnapshotCallback)(int errorCode, UIImage *_Nullable image)
截图结果 block 回调。
Definition INERtcEngine.h:64
void(^ NERtcJoinChannelCompletion)(NSError *_Nullable error, uint64_t channelId, uint64_t elapesd, uint64_t uid)
加入房间 block。
Definition INERtcEngine.h:36
void(^ NERtcLiveStreamCompletion)(NSString *taskId, kNERtcLiveStreamError errorCode)
互动直播推流 block。
Definition INERtcEngine.h:50
NERtcMediaPubType
媒体 pub 类型。
Definition NERtcEngineEnum.h:235
NERtcSpatializerRenderMode
空间音效渲染模式
Definition NERtcEngineEnum.h:1864
NERtcDistanceRolloffModel
空间音效衰减模式
Definition NERtcEngineEnum.h:1890
NERtcConnectionStateType
当前房间的连接状态。
Definition NERtcEngineEnum.h:45
NERtcCameraPosition
指定的摄像头位置。
Definition NERtcEngineEnum.h:1380
NERtcRemoteVideoStreamType
远端视频流类型。
Definition NERtcEngineEnum.h:656
NERtcStreamFallbackOptions
Definition NERtcEngineEnum.h:1951
NERtcRangeAudioMode
Definition NERtcEngineEnum.h:1909
NERtcClientRole
用户角色。
Definition NERtcEngineEnum.h:206
NERtcStreamChannelType
SEI 发送的流通道类型。
Definition NERtcEngineEnum.h:1063
NERtcVideoRenderScaleMode
视频渲染缩放模式。
Definition NERtcEngineEnum.h:732
NERtcMediaPriorityType
Definition NERtcEngineEnum.h:1930
NERtcAudioStreamType
音频流类型,目前同时支持音频两路流:主流和辅流
Definition NERtcEngineEnum.h:1706
摄像头采集配置。
Definition NERtcEngineBase.h:488
Definition NERtcEngineBase.h:1751
joinChannel 回调时的一些可选信息
Definition NERtcEngineBase.h:2757
joinChannel 时的一些可选信息
Definition NERtcEngineBase.h:2738
直播推流任务的配置。
Definition NERtcEngineBase.h:1308
3D 音效算法中坐标信息。
Definition NERtcEngineBase.h:2976
3D 音效房间属性设置。
Definition NERtcEngineBase.h:3052
视频画布设置。
Definition NERtcEngineBase.h:296
本地视频发送配置
Definition NERtcEngineBase.h:542
视频帧信息。
Definition NERtcEngineBase.h:1607
本地辅流发送配置。
Definition NERtcEngineBase.h:648