NERtc iOS SDK V5.6.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
752- (int)setChannelProfile:(NERtcChannelProfileType)channelProfile;
753
754
815- (int)setLocalVideoConfig:(NERtcVideoEncodeConfiguration *)config;
816
880- (int)setLocalVideoConfig:(NERtcVideoEncodeConfiguration *)config streamType:(NERtcStreamChannelType)streamType;
881
930- (int)setAudioProfile:(NERtcAudioProfileType)profile scenario:(NERtcAudioScenarioType)scenario;
931
964- (int)setAudioProfile:(NERtcAudioProfileType)profile;
965
998- (int)setAudioScenario:(NERtcAudioScenarioType)scenario;
999
1049- (int)setupLocalVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas;
1050
1111- (int)setupRemoteVideoCanvas:(NERtcVideoCanvas * _Nullable)canvas forUserID:(uint64_t)userID;
1112
1141 - (int)switchCamera;
1142
1200- (int)setClientRole:(NERtcClientRole)role;
1201
1244- (int)setParameters:(NSDictionary *)parameters;
1245
1253- (NSString * _Nullable)getParameter:(NSString * _Nonnull)parameterKey extraInfo:(NSString * _Nullable)extraInfo;
1254
1255@end
1256
1257
1258NS_ASSUME_NONNULL_END
1259
1260#pragma clang diagnostic pop
1261
1262#endif /* INERtcEngine_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
NERtcAudioProfileType
音频质量能力概要 音频属性:设置采样率,码率,编码模式和声道数
Definition NERtcEngineEnum.h:1470
NERtcMediaPubType
媒体 pub 类型。
Definition NERtcEngineEnum.h:235
NERtcConnectionStateType
当前房间的连接状态。
Definition NERtcEngineEnum.h:45
NERtcAudioScenarioType
音频应用场景。 不同的场景设置对应不同的音频采集模式(移动平台)、播放模式。
Definition NERtcEngineEnum.h:1554
NERtcChannelProfileType
房间场景。
Definition NERtcEngineEnum.h:1601
NERtcClientRole
用户角色。
Definition NERtcEngineEnum.h:206
NERtcStreamChannelType
SEI 发送的流通道类型。
Definition NERtcEngineEnum.h:1063
kNERtcLiveStreamError
LiveStream Error Code。 Will be deprecated, please use NERtcError instead
Definition NERtcEngineErrorCode.h:871
摄像头采集配置。
Definition NERtcEngineBase.h:488
初始化设置 NERtcEngine
Definition NERtcEngineContext.h:22
joinChannel 回调时的一些可选信息
Definition NERtcEngineBase.h:2757
joinChannel 时的一些可选信息
Definition NERtcEngineBase.h:2738
视频画布设置。
Definition NERtcEngineBase.h:296
本地视频发送配置
Definition NERtcEngineBase.h:542