NERTC iOS SDK V5.10.1
载入中...
搜索中...
未找到
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
60typedef void(^NERtcLLMRequestCompletion)(NSString *taskId, int code, NSString * _Nullable errorMsg);
61
74typedef void(^NERtcTakeSnapshotCallback)(int errorCode, UIImage * _Nullable image);
75
79@class NERtcVideoCanvas;
81
90@protocol INERtcEngine <NSObject>
91
92
93@property (nonatomic, weak, readonly) id<NERtcEngineDelegateEx> engineDelegate;
94
106
160- (int)setupEngineWithContext:(NERtcEngineContext *)context;
161
167- (int)setEngineEventDelegate:(nullable id<NERtcEngineDelegateEx>)delegate;
168
180- (int)setDelegateQueue:(nullable dispatch_queue_t)delegateQueue;
181
265
266- (int)joinChannelWithToken:(NSString *)token
267 channelName:(NSString *)channelName
268 myUid:(uint64_t)uId
269 completion:(NERtcJoinChannelCompletion)completion;
270
359- (int)joinChannelWithToken:(NSString *)token
360 channelName:(NSString *)channelName
361 myUid:(uint64_t)uId
362 channelOptions:(nullable NERtcJoinChannelOptions *)channelOptions
363 completion:(void(^)(NSError * _Nullable error, uint64_t channelId, uint64_t elapesd, uint64_t uid, NERtcJoinChannelExtraInfo * _Nullable info))completion;
364
394
464- (int)switchChannelWithToken:(NSString *)token channelName:(NSString *)channelName completion:(NERtcJoinChannelCompletion)completion;
465
503- (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;
504
564 - (int)enableLocalAudio:(BOOL)enabled;
565
616 - (int)enableLocalVideo:(BOOL)enabled;
617
672 - (int)enableLocalVideo:(BOOL)enabled streamType:(NERtcStreamChannelType)streamType;
673
714- (int)enableMediaPub:(BOOL)enabled withMediaType:(NERtcMediaPubType)mediaType;
715
763- (int)setChannelProfile:(NERtcChannelProfileType)channelProfile;
764
765
826- (int)setLocalVideoConfig:(NERtcVideoEncodeConfiguration *)config;
827
891- (int)setLocalVideoConfig:(NERtcVideoEncodeConfiguration *)config streamType:(NERtcStreamChannelType)streamType;
892
941- (int)setAudioProfile:(NERtcAudioProfileType)profile scenario:(NERtcAudioScenarioType)scenario;
942
975- (int)setAudioProfile:(NERtcAudioProfileType)profile;
976
1009- (int)setAudioScenario:(NERtcAudioScenarioType)scenario;
1010
1042- (int)setAINSMode:(NERtcAudioAINSMode)mode;
1043
1093- (int)setupLocalVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas;
1094
1155- (int)setupRemoteVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas forUserID:(uint64_t)userID;
1156
1186
1244- (int)setClientRole:(NERtcClientRole)role;
1245
1287
1288- (int)setParameters:(NSDictionary *)parameters;
1289
1297- (NSString * _Nullable)getParameter:(NSString * _Nonnull)parameterKey extraInfo:(NSString * _Nullable)extraInfo;
1298
1299@end
1300
1301
1302NS_ASSUME_NONNULL_END
1303
1304#pragma clang diagnostic pop
1305
1306#endif /* INERtcEngine_h */
void(^ NERtcTakeSnapshotCallback)(int errorCode, UIImage *_Nullable image)
截图结果 block 回调。
定义 INERtcEngine.h:74
void(^ NERtcJoinChannelCompletion)(NSError *_Nullable error, uint64_t channelId, uint64_t elapesd, uint64_t uid)
加入房间 block。
定义 INERtcEngine.h:36
void(^ NERtcLLMRequestCompletion)(NSString *taskId, int code, NSString *_Nullable errorMsg)
LLM 请求结果 block 回调。
定义 INERtcEngine.h:60
void(^ NERtcLiveStreamCompletion)(NSString *taskId, kNERtcLiveStreamError errorCode)
互动直播推流 block。
定义 INERtcEngine.h:50
NERtcAudioProfileType
音频质量能力概要 音频属性:设置采样率,码率,编码模式和声道数
定义 NERtcEngineEnum.h:2041
NERtcMediaPubType
媒体 pub 类型。
定义 NERtcEngineEnum.h:235
NERtcAudioAINSMode
AI 降噪模式。
定义 NERtcEngineEnum.h:2172
NERtcConnectionStateType
当前房间的连接状态。
定义 NERtcEngineEnum.h:45
NERtcAudioScenarioType
音频应用场景。 不同的场景设置对应不同的音频采集模式(移动平台)、播放模式。
定义 NERtcEngineEnum.h:2125
NERtcChannelProfileType
房间场景。
定义 NERtcEngineEnum.h:2211
NERtcClientRole
用户角色。
定义 NERtcEngineEnum.h:206
NERtcStreamChannelType
SEI 发送的流通道类型。
定义 NERtcEngineEnum.h:1135
kNERtcLiveStreamError
LiveStream Error Code。 Will be deprecated, please use NERtcError instead
定义 NERtcEngineErrorCode.h:977
摄像头采集配置。
定义 NERtcEngineBase.h:491
初始化设置 NERtcEngine
定义 NERtcEngineContext.h:22
joinChannel 回调时的一些可选信息
定义 NERtcEngineBase.h:2852
joinChannel 时的一些可选信息
定义 NERtcEngineBase.h:2831
视频画布设置。
定义 NERtcEngineBase.h:299
本地视频发送配置
定义 NERtcEngineBase.h:555
NERtcConnectionStateType connectionState()
获取当前房间连接状态。
int switchCamera()
切换前置或后置摄像头。
id< NERtcEngineDelegateEx > engineDelegate
定义 INERtcEngine.h:93
int leaveChannel()
离开音视频房间。 通过本接口可以实现挂断或退出通话,并释放本房间内的相关资源。