NERTC iOS SDK V5.9.10
载入中...
搜索中...
未找到
INERtcEngine.h
浏览该文件的文档.
1/*
2 * Copyright (c) 2021 NetEase, Inc. All rights reserved.
3 */
4
5#ifndef INERtcEngine_h
6#define INERtcEngine_h
7
8#import <Foundation/Foundation.h>
9#import "NERtcEngineEnum.h"
12
13#pragma clang diagnostic push
14#pragma clang diagnostic ignored "-Wdocumentation"
15
16NS_ASSUME_NONNULL_BEGIN
17
19
36typedef void(^NERtcJoinChannelCompletion)(NSError * _Nullable error, uint64_t channelId, uint64_t elapesd, uint64_t uid);
37
50typedef void(^NERtcLiveStreamCompletion)(NSString *taskId, kNERtcLiveStreamError errorCode);
51
64typedef void(^NERtcTakeSnapshotCallback)(int errorCode, UIImage * _Nullable image);
65
69@class NERtcVideoCanvas;
71
80@protocol INERtcEngine <NSObject>
81
82
83@property (nonatomic, weak, readonly) id<NERtcEngineDelegateEx> engineDelegate;
84
95- (NERtcConnectionStateType)connectionState;
96
150- (int)setupEngineWithContext:(NERtcEngineContext *)context;
151
157- (int)setEngineEventDelegate:(nullable id<NERtcEngineDelegateEx>)delegate;
158
170- (int)setDelegateQueue:(nullable dispatch_queue_t)delegateQueue;
171
256- (int)joinChannelWithToken:(NSString *)token
257 channelName:(NSString *)channelName
258 myUid:(uint64_t)uId
259 completion:(NERtcJoinChannelCompletion)completion;
260
349- (int)joinChannelWithToken:(NSString *)token
350 channelName:(NSString *)channelName
351 myUid:(uint64_t)uId
352 channelOptions:(nullable NERtcJoinChannelOptions *)channelOptions
353 completion:(void(^)(NSError * _Nullable error, uint64_t channelId, uint64_t elapesd, uint64_t uid, NERtcJoinChannelExtraInfo * _Nullable info))completion;
354
383- (int)leaveChannel;
384
454- (int)switchChannelWithToken:(NSString *)token channelName:(NSString *)channelName completion:(NERtcJoinChannelCompletion)completion;
455
493- (int)switchChannelWithToken:(NSString *)token channelName:(NSString *)channelName channelOptions:(nullable NERtcJoinChannelOptions *)channelOptions completion:(void(^)(NSError * _Nullable error, uint64_t channelId, uint64_t elapesd, uint64_t uid, NERtcJoinChannelExtraInfo * _Nullable info))completion;
494
554 - (int)enableLocalAudio:(BOOL)enabled;
555
606 - (int)enableLocalVideo:(BOOL)enabled;
607
662 - (int)enableLocalVideo:(BOOL)enabled streamType:(NERtcStreamChannelType)streamType;
663
704- (int)enableMediaPub:(BOOL)enabled withMediaType:(NERtcMediaPubType)mediaType;
705
753- (int)setChannelProfile:(NERtcChannelProfileType)channelProfile;
754
755
816- (int)setLocalVideoConfig:(NERtcVideoEncodeConfiguration *)config;
817
881- (int)setLocalVideoConfig:(NERtcVideoEncodeConfiguration *)config streamType:(NERtcStreamChannelType)streamType;
882
931- (int)setAudioProfile:(NERtcAudioProfileType)profile scenario:(NERtcAudioScenarioType)scenario;
932
965- (int)setAudioProfile:(NERtcAudioProfileType)profile;
966
999- (int)setAudioScenario:(NERtcAudioScenarioType)scenario;
1000
1032- (int)setAINSMode:(NERtcAudioAINSMode)mode;
1033
1083- (int)setupLocalVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas;
1084
1145- (int)setupRemoteVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas forUserID:(uint64_t)userID;
1146
1175 - (int)switchCamera;
1176
1234- (int)setClientRole:(NERtcClientRole)role;
1235
1278- (int)setParameters:(NSDictionary *)parameters;
1279
1287- (NSString * _Nullable)getParameter:(NSString * _Nonnull)parameterKey extraInfo:(NSString * _Nullable)extraInfo;
1288
1289@end
1290
1291
1292NS_ASSUME_NONNULL_END
1293
1294#pragma clang diagnostic pop
1295
1296#endif /* INERtcEngine_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
NERtcAudioProfileType
音频质量能力概要 音频属性:设置采样率,码率,编码模式和声道数
定义 NERtcEngineEnum.h:2031
NERtcMediaPubType
媒体 pub 类型。
定义 NERtcEngineEnum.h:235
NERtcAudioAINSMode
AI 降噪模式。
定义 NERtcEngineEnum.h:2162
NERtcConnectionStateType
当前房间的连接状态。
定义 NERtcEngineEnum.h:45
NERtcAudioScenarioType
音频应用场景。 不同的场景设置对应不同的音频采集模式(移动平台)、播放模式。
定义 NERtcEngineEnum.h:2115
NERtcChannelProfileType
房间场景。
定义 NERtcEngineEnum.h:2201
NERtcClientRole
用户角色。
定义 NERtcEngineEnum.h:206
NERtcStreamChannelType
SEI 发送的流通道类型。
定义 NERtcEngineEnum.h:1125
kNERtcLiveStreamError
LiveStream Error Code。 Will be deprecated, please use NERtcError instead
定义 NERtcEngineErrorCode.h:977
摄像头采集配置。
定义 NERtcEngineBase.h:491
初始化设置 NERtcEngine
定义 NERtcEngineContext.h:22
joinChannel 回调时的一些可选信息
定义 NERtcEngineBase.h:2835
joinChannel 时的一些可选信息
定义 NERtcEngineBase.h:2814
视频画布设置。
定义 NERtcEngineBase.h:299
本地视频发送配置
定义 NERtcEngineBase.h:555