10.9提交
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "GroupHeader.h"
|
||||
|
||||
@interface GroupCallMember : NSObject
|
||||
|
||||
/// 用户IM标识
|
||||
@property(nonatomic, strong) NSString *imAccid;
|
||||
|
||||
/// 用户RTC标识
|
||||
@property(nonatomic, assign) int64_t rtcUid;
|
||||
|
||||
/// 多人通话用户状态 {@link GroupHeader}
|
||||
@property(nonatomic, assign) NSInteger state;
|
||||
|
||||
/// 多人通话用户行为 {@link GroupHeader}
|
||||
@property(nonatomic, strong) NSString *action;
|
||||
|
||||
/// 扩展字段,主叫透传被叫
|
||||
@property(nonatomic, strong) NSString *extraInfo;
|
||||
|
||||
/// 是否打开视频
|
||||
@property(nonatomic, assign) BOOL isOpenVideo;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,113 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface GroupPushParam : NSObject
|
||||
|
||||
/// 推送模式{@link GroupHeader => GroupPushMode },默认开启
|
||||
@property(nonatomic, assign) NSInteger pushMode;
|
||||
|
||||
/// 推送文案,最长 500 个字符。
|
||||
@property(nonatomic, strong) NSString *pushContent;
|
||||
|
||||
/// 推送对应的 payload,必须是 JSON 格式且不能超过 2000 字符。
|
||||
@property(nonatomic, strong) NSString *payload;
|
||||
|
||||
/// 客户端本地的声音文件名,长度不要超过 30 个字符。
|
||||
@property(nonatomic, strong) NSString *sound;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupCallParam : NSObject
|
||||
|
||||
/// 多人通话唯一识别id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
/// 被邀请的群成员列表
|
||||
@property(nonatomic, strong) NSArray<NSString *> *calleeList;
|
||||
|
||||
/// 群ID
|
||||
@property(nonatomic, strong) NSString *groupId;
|
||||
|
||||
/// 群类型{@link GroupHeader => GroupType }
|
||||
@property(nonatomic, assign) NSInteger groupType;
|
||||
|
||||
/// 邀请模式{@link GroupHeader => GroupInviteMode }
|
||||
@property(nonatomic, assign) NSInteger inviteMode;
|
||||
|
||||
/// 加入模式{@link GroupHeader => GroupJoinMode }
|
||||
@property(nonatomic, assign) NSInteger joinMode;
|
||||
|
||||
/// 自定义透传信息
|
||||
@property(nonatomic, strong) NSString *extraInfo;
|
||||
|
||||
/// 推送配置
|
||||
@property(nonatomic, strong) GroupPushParam *pushParam;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupHangupParam : NSObject
|
||||
|
||||
/// 通话id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
/// 挂断原因
|
||||
@property(nonatomic, assign) NSInteger reason;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupAcceptParam : NSObject
|
||||
|
||||
/// 通话id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupInviteParam : NSObject
|
||||
|
||||
/// 通话id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
/// 邀请列表
|
||||
@property(nonatomic, strong) NSArray<NSString *> *calleeList;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupJoinParam : NSObject
|
||||
|
||||
/// 通话id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupQueryCallInfoParam : NSObject
|
||||
|
||||
/// 通话id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupQueryMembersParam : NSObject
|
||||
|
||||
/// 通话id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupConfigParam : NSObject
|
||||
|
||||
@property(nonatomic, strong) NSString *host;
|
||||
|
||||
/// 是否开启安全模式,默认NO 不开启
|
||||
@property(nonatomic, assign) BOOL rtcSafeMode;
|
||||
|
||||
/// appkey 或 appid
|
||||
@property(nonatomic, strong) NSString *appid;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,90 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "NEGroupCallInfo.h"
|
||||
#import "NEGroupInfo.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface GroupBaseResult : NSObject
|
||||
|
||||
/// 错误码
|
||||
@property(nonatomic, assign) NSInteger code;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupCallResult : GroupBaseResult
|
||||
|
||||
/// 通话id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
/// 主叫id
|
||||
@property(nonatomic, assign) NSInteger callerUid;
|
||||
|
||||
/// 通话发起时间
|
||||
@property(nonatomic, assign) NSInteger startTimestamp;
|
||||
|
||||
/// 信令通道id
|
||||
@property(nonatomic, assign) uint64_t channelId;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupHangupResult : GroupBaseResult
|
||||
|
||||
/// 通话id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
/// 挂断原因
|
||||
@property(nonatomic, assign) NSInteger reason;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupAcceptResult : GroupBaseResult
|
||||
|
||||
/// 多人通话信息
|
||||
@property(nonatomic, strong) NEGroupCallInfo *groupCallInfo;
|
||||
|
||||
/// 信令通道id
|
||||
@property(nonatomic, assign) uint64_t channelId;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupInviteResult : GroupBaseResult
|
||||
|
||||
/// 通话id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupJoinResult : GroupBaseResult
|
||||
|
||||
/// 多人通话信息
|
||||
@property(nonatomic, strong) NEGroupCallInfo *groupCallInfo;
|
||||
|
||||
/// 信令通道id
|
||||
@property(nonatomic, assign) uint64_t channelId;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupQueryCallInfoResult : GroupBaseResult
|
||||
|
||||
/// 多人通话信息
|
||||
@property(nonatomic, strong) NEGroupInfo *groupCallInfo;
|
||||
|
||||
@end
|
||||
|
||||
@interface GroupQueryMembersResult : GroupBaseResult
|
||||
|
||||
/// 通话id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
/// 多人通话信息
|
||||
@property(nonatomic, strong) GroupCallMember *callerInfo;
|
||||
|
||||
/// 被叫列表
|
||||
@property(nonatomic, strong) NSArray<GroupCallMember *> *calleeList;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,76 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef GroupHeader_h
|
||||
#define GroupHeader_h
|
||||
|
||||
/// 邀请模式
|
||||
typedef NS_ENUM(NSUInteger, GroupInviteMode) {
|
||||
/// 任何人可以邀请
|
||||
AnyoneInviteMode = 0,
|
||||
/// 发起者才能邀请
|
||||
OwnerInviteMode = 1
|
||||
};
|
||||
|
||||
/// 加入模式
|
||||
typedef NS_ENUM(NSUInteger, GroupJoinMode) {
|
||||
/// 任何人都可以加入群聊通话
|
||||
JoinModeAnyone = 0,
|
||||
/// 只能被邀请
|
||||
JoinModeInvited = 1
|
||||
};
|
||||
|
||||
/// 群类型
|
||||
typedef NS_ENUM(NSUInteger, GroupType) {
|
||||
/// 讨论组
|
||||
GroupTypeDiscussion = 1,
|
||||
/// 高级群
|
||||
GroupTypeSenior = 2,
|
||||
/// 聊天室
|
||||
GroupTypeChatroom = 3
|
||||
};
|
||||
|
||||
/// 用户状态
|
||||
typedef NS_ENUM(NSInteger, GroupMemberState) {
|
||||
/// 等待接听
|
||||
GroupMemberStateWaitting = 1,
|
||||
/// 已经在房间中
|
||||
GroupMemberStateInChannel = 2,
|
||||
/// 用户已经挂断
|
||||
GroupMemberStateHangup = 3,
|
||||
/// 已接收邀请但未在rtc通道中
|
||||
GroupMemberStateAccept = 4,
|
||||
};
|
||||
|
||||
/// 推送模式
|
||||
typedef NS_ENUM(NSInteger, GroupPushMode) {
|
||||
/// 关闭
|
||||
GroupPushModeClose = 0,
|
||||
/// 开启
|
||||
GroupPushModeOpen = 1,
|
||||
/// 强制推送
|
||||
GroupPushModeForce = 2,
|
||||
};
|
||||
|
||||
#pragma mark - 用户行为
|
||||
/// 用户接受邀请
|
||||
static NSString *kActionAccept = @"accept";
|
||||
/// 用户拒绝邀请
|
||||
static NSString *kActionReject = @"reject";
|
||||
/// 用户离开
|
||||
static NSString *kActionLeave = @"leave";
|
||||
/// 用户加入
|
||||
static NSString *kActionJoin = @"join";
|
||||
|
||||
#pragma mark - 挂断原因
|
||||
/// 超时
|
||||
static NSString *kReasonTimeout = @"timeout";
|
||||
/// 忙线
|
||||
static NSString *kReasonBusy = @"busy";
|
||||
/// 其他端接听
|
||||
static NSString *kReasonPeerAccept = @"peerAccept";
|
||||
/// 其他端拒绝
|
||||
static NSString *kReasonPeerReject = @"peerReject";
|
||||
|
||||
#endif /* GroupHeader_h */
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NECallConfig : NSObject
|
||||
|
||||
/// 支持离线,默认支持离线
|
||||
@property(nonatomic, assign) BOOL enableOffline;
|
||||
|
||||
/// 开启切换视频通话确认,默认不开启
|
||||
@property(nonatomic, assign) BOOL enableSwitchVideoConfirm;
|
||||
|
||||
/// 开启切换音频通话确认,默认不开启
|
||||
@property(nonatomic, assign) BOOL enableSwitchAudioConfirm;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NECallConnectedInfo : NSObject
|
||||
|
||||
/// 用户accId
|
||||
@property(nonatomic, strong) NSString *accId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "NECallEngineConsts.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NECallEndInfo : NSObject
|
||||
|
||||
@property(nonatomic, assign) NERtcCallTerminalCode reasonCode;
|
||||
|
||||
/// 主叫hangup方法透传被叫字段
|
||||
@property(nonatomic, strong, nullable) NSString *extraString;
|
||||
|
||||
/// reason 对应的描述信息
|
||||
@property(nonatomic, strong, nullable) NSString *message;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,197 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "NECallConfig.h"
|
||||
#import "NECallConnectedInfo.h"
|
||||
#import "NECallEndInfo.h"
|
||||
#import "NECallEngineConsts.h"
|
||||
#import "NECallInfo.h"
|
||||
#import "NECallParam.h"
|
||||
#import "NECallPushConfig.h"
|
||||
#import "NECallTypeChangeInfo.h"
|
||||
#import "NEHangupParam.h"
|
||||
#import "NEInviteInfo.h"
|
||||
#import "NERecordConfig.h"
|
||||
#import "NESetupConfig.h"
|
||||
#import "NESwitchParam.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol NECallEngineRtcDelegateEx <NSObject>
|
||||
|
||||
- (void)onNERtcEngineVirtualBackgroundSourceEnabled:(BOOL)enabled
|
||||
reason:(NERtcVirtualBackgroundSourceStateReason)reason;
|
||||
|
||||
@end
|
||||
|
||||
@protocol NERecordProvider <NSObject>
|
||||
|
||||
- (void)onRecordSend:(NERecordConfig *)config;
|
||||
|
||||
@end
|
||||
|
||||
@protocol NECallEngineDelegate <NSObject>
|
||||
|
||||
#pragma mark - 回调接口
|
||||
|
||||
@optional
|
||||
|
||||
/// 收到邀请的回调
|
||||
/// @param info 邀请信息
|
||||
- (void)onReceiveInvited:(NEInviteInfo *)info;
|
||||
|
||||
/// 通话结束
|
||||
/// @param info 通话结束携带信息
|
||||
- (void)onCallEnd:(NECallEndInfo *)info;
|
||||
|
||||
/// 通话建立的回调
|
||||
/// @param info 通话建立回调信息
|
||||
- (void)onCallConnected:(NECallInfo *)info;
|
||||
|
||||
/// 通话类型切换的回调
|
||||
/// @param info 通话类型改变回调(本端调用或者远端调用此回调都会触发,可根据此回调做UI变更处理)
|
||||
- (void)onCallTypeChange:(NECallTypeChangeInfo *)info;
|
||||
|
||||
/// 启用/禁用视频采集
|
||||
/// @param available 是否可用
|
||||
/// @param userId 用户ID
|
||||
- (void)onVideoAvailable:(BOOL)available userID:(NSString *)userId;
|
||||
|
||||
/// 视频采集变更回调
|
||||
/// @param muted 是否关闭采集
|
||||
/// @param userId 用户ID
|
||||
- (void)onVideoMuted:(BOOL)muted userID:(NSString *)userId;
|
||||
|
||||
/// 音频采集变更回调
|
||||
/// @param muted 是否关闭采集
|
||||
/// @param userId 用户ID
|
||||
- (void)onAudioMuted:(BOOL)muted userID:(NSString *)userId;
|
||||
|
||||
#pragma mark - 内部周期回调接口
|
||||
|
||||
/// Rtc 初始化完成回调
|
||||
- (void)onRtcInitEnd;
|
||||
|
||||
@end
|
||||
|
||||
@interface NECallEngine : NSObject
|
||||
|
||||
/// 通话状态
|
||||
@property(nonatomic, assign, readonly) NERtcCallStatus callStatus;
|
||||
|
||||
/// 单位:秒,IM服务器邀请2分钟后无响应为超时,最大值不超过2分钟。
|
||||
@property(nonatomic, assign) NSTimeInterval timeOutSeconds;
|
||||
|
||||
/// NERtcEngine 的回调接口,由用户提供
|
||||
@property(nonatomic, weak) id<NERtcEngineDelegateEx> engineDelegate;
|
||||
|
||||
/// 中转NERtcEngine统计回调
|
||||
@property(nonatomic, weak) id<NERtcEngineMediaStatsObserver> observer;
|
||||
|
||||
/// 初始化设置
|
||||
@property(nonatomic, readonly, strong) NESetupConfig *config;
|
||||
|
||||
/// 单例
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/// 销毁
|
||||
- (void)destroy;
|
||||
|
||||
#pragma mark - 主流程
|
||||
|
||||
/// 初始化
|
||||
/// @param config 初始化参数
|
||||
- (void)setup:(NESetupConfig *)config;
|
||||
|
||||
/// 开始呼叫
|
||||
/// @param param 呼叫参数
|
||||
/// @param completion 完成回调
|
||||
- (void)call:(NECallParam *)param
|
||||
completion:
|
||||
(nullable void (^)(NSError *_Nullable error, NECallInfo *_Nullable callInfo))completion;
|
||||
|
||||
/// 接受呼叫
|
||||
/// @param completion 回调
|
||||
- (void)accept:(nullable void (^)(NSError *_Nullable error,
|
||||
NECallInfo *_Nullable callInfo))completion;
|
||||
|
||||
/// 挂断(内部会自动根据状态机状态做取消呼叫 拒绝接听 挂断动作)
|
||||
/// @param param 挂断参数
|
||||
/// @param completion 结束回调
|
||||
- (void)hangup:(NEHangupParam *)param
|
||||
completion:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
#pragma mark - 配置接口
|
||||
|
||||
/// 切换通话类型
|
||||
/// @param param 切换参数
|
||||
- (void)switchCallType:(NESwitchParam *)param
|
||||
completion:(nullable void (^)(NSError *_Nullable))completion;
|
||||
|
||||
/// 设置超时时间
|
||||
/// @param time 超时时间,单位秒,不超过120s,超过内部会用120s处理
|
||||
- (void)setTimeout:(int)time;
|
||||
|
||||
/// 设置自己画面
|
||||
/// @param view 渲染自己画面的View
|
||||
/// @discussion view上不建议有任何subview
|
||||
/// @return 0 操作成功
|
||||
- (int)setupLocalView:(nullable UIView *)view;
|
||||
|
||||
/// 设置其他用户画面
|
||||
/// @param view 渲染其他画面的View
|
||||
/// @discussion view上不建议有任何subview
|
||||
/// @return 0 正常, -1 没有查询到 uid
|
||||
- (int)setupRemoteView:(nullable UIView *)view;
|
||||
|
||||
/// 启动或关闭摄像头
|
||||
/// @param enable YES:启动,NO:关闭
|
||||
/// @return 操作返回值,成功则返回 0
|
||||
- (int)enableLocalVideo:(BOOL)enable;
|
||||
|
||||
/// 启动或关闭视频流发送
|
||||
/// @param muted YES 开启 NO 关闭
|
||||
/// @return 操作返回值,成功则返回 0
|
||||
- (int)muteLocalVideo:(BOOL)muted;
|
||||
|
||||
/// 启动或关闭声音采集
|
||||
/// @param muted YES 开启 NO 关闭
|
||||
/// @return 操作返回值,成功则返回 0
|
||||
- (int)muteLocalAudio:(BOOL)muted;
|
||||
|
||||
/// 设置发送话单回调(如果实现会截断内部话单流程,请在此实现中自己处理话单发送相关功能)
|
||||
/// @param provider 话单实现接口
|
||||
- (void)setCallRecordProvider:(id<NERecordProvider>)provider;
|
||||
|
||||
/// 摄像头前后切换
|
||||
- (void)switchCamera;
|
||||
|
||||
/// 设置呼叫时的配置参数,切换音视频是否需要切换,信令消息是否支持离线等
|
||||
/// @param config 呼叫配置
|
||||
- (void)setCallConfig:(NECallConfig *)config;
|
||||
|
||||
/// 添加代理
|
||||
- (void)addCallDelegate:(id<NECallEngineDelegate>)delegate;
|
||||
|
||||
/// 移除代码
|
||||
- (void)removeCallDelegate:(id<NECallEngineDelegate>)delegate;
|
||||
|
||||
#pragma mark - 状态信息获取
|
||||
|
||||
/// 获取当前通话信息
|
||||
/// @return info 通话信息
|
||||
- (nullable NECallInfo *)getCallInfo;
|
||||
|
||||
/// 获取当前通话配置
|
||||
/// @return config 通话配置
|
||||
- (NECallConfig *)getCallConfig;
|
||||
|
||||
/// 版本号
|
||||
+ (NSString *)getVersion;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef NECallEngineConsts_h
|
||||
#define NECallEngineConsts_h
|
||||
|
||||
@class NERtcCallKitPushConfig;
|
||||
@class NERtcCallKitContext;
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, NECallType) {
|
||||
/// 音频
|
||||
NECallTypeAudio = 1,
|
||||
/// 视频
|
||||
NECallTypeVideo = 2,
|
||||
};
|
||||
|
||||
/// 通话行为
|
||||
typedef NS_ENUM(NSUInteger, NECallSwitchState) {
|
||||
/// 邀请
|
||||
NECallSwitchStateInvite = 1,
|
||||
/// 接受
|
||||
NECallSwitchStateAgree = 2,
|
||||
/// 拒绝
|
||||
NECallSwitchStateReject = 3,
|
||||
};
|
||||
|
||||
/// 引擎状态
|
||||
typedef NS_ENUM(NSUInteger, NECallEngineStatus) {
|
||||
/// 闲置
|
||||
NECallStatusIdle = 0,
|
||||
/// 呼叫中
|
||||
NECallStatusCalling,
|
||||
/// 正在被呼叫
|
||||
NECallStatusCalled,
|
||||
/// 通话中
|
||||
NECallStatusInCall,
|
||||
};
|
||||
|
||||
/// 通话状态
|
||||
typedef NS_ENUM(NSUInteger, NERtcCallStatus) {
|
||||
/// 闲置
|
||||
NERtcCallStatusIdle = 0,
|
||||
/// 呼叫中
|
||||
NERtcCallStatusCalling,
|
||||
/// 正在被呼叫
|
||||
NERtcCallStatusCalled,
|
||||
/// 通话中
|
||||
NERtcCallStatusInCall,
|
||||
};
|
||||
|
||||
/// 通话结束错误码
|
||||
typedef NS_ENUM(NSInteger, NERtcCallTerminalCode) {
|
||||
/// 正常流程
|
||||
TerminalCodeNormal = 0,
|
||||
/// token 请求失败
|
||||
TerminalCodeTokenError,
|
||||
/// 超时
|
||||
TerminalCodeTimeOut,
|
||||
/// 用户占线
|
||||
TerminalCodeBusy,
|
||||
/// rtc 初始化失败
|
||||
TerminalCodeRtcInitError,
|
||||
/// 加入rtc失败
|
||||
TerminalCodeJoinRtcError,
|
||||
/// cancel 取消参数错误
|
||||
TerminalCodeCancelErrorParam,
|
||||
/// 发起呼叫失败
|
||||
TerminalCodeCallFailed,
|
||||
/// 账号被踢
|
||||
TerminalCodeKicked,
|
||||
/// uid 为空
|
||||
TerminalCodeEmptyUid,
|
||||
/// Rtc 断连
|
||||
TerminalRtcDisconnected = 10,
|
||||
/// 取消呼叫
|
||||
TerminalCallerCancel = 11,
|
||||
/// 呼叫被取消
|
||||
TerminalCalleeCancel = 12,
|
||||
/// 拒绝呼叫
|
||||
TerminalCalleeReject = 13,
|
||||
/// 呼叫被拒绝
|
||||
TerminalCallerRejcted = 14,
|
||||
/// 挂断呼叫
|
||||
TerminalHuangUp = 15,
|
||||
/// 呼叫被挂断
|
||||
TerminalBeHuangUp = 16,
|
||||
/// 多端登录被其他端拒绝
|
||||
TerminalOtherRejected = 17,
|
||||
/// 多端登录被其他端接听
|
||||
TerminalOtherAccepted = 18,
|
||||
/// Rtc房间断开链接
|
||||
TerminalUserRtcDisconnected = 19,
|
||||
/// 离开Rtc房间
|
||||
TerminalUserRtcLeave = 20,
|
||||
/// 接听失败
|
||||
TerminalAcceptFail = 21,
|
||||
};
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, NERtcCallType) {
|
||||
/// 音频
|
||||
NERtcCallTypeAudio = 1,
|
||||
/// 视频
|
||||
NERtcCallTypeVideo = 2,
|
||||
};
|
||||
|
||||
/// 通话行为
|
||||
typedef NS_ENUM(NSUInteger, NERtcSwitchState) {
|
||||
/// 邀请
|
||||
NERtcSwitchStateInvite = 1,
|
||||
/// 接受
|
||||
NERtcSwitchStateAgree = 2,
|
||||
/// 拒绝
|
||||
NERtcSwitchStateReject = 3,
|
||||
};
|
||||
|
||||
/// RTCSDK初始化模式
|
||||
typedef NS_ENUM(NSUInteger, NECallInitRtcMode) {
|
||||
/// 全局初始化一次
|
||||
GlobalInitRtc = 1,
|
||||
/// 主叫呼叫以及被叫接收到呼叫邀请时候初始化,结束通话后销毁Rtc
|
||||
InitRtcInNeed,
|
||||
/// 被叫初始化Rtc延迟到 accept 执行
|
||||
InitRtcInNeedDelayToAccept,
|
||||
};
|
||||
|
||||
/// 引擎错误码
|
||||
typedef NS_ENUM(NSInteger, NECallEngineErrorCode) {
|
||||
/// 当前状态不支持
|
||||
CurrentStatusNotSupport = 20026
|
||||
};
|
||||
|
||||
typedef void (^NERtcCallKitTokenHandler)(uint64_t uid, NSString *channelName,
|
||||
void (^complete)(NSString *token, NSError *error));
|
||||
|
||||
typedef void (^NERtcCallKitPushConfigHandler)(NERtcCallKitPushConfig *config,
|
||||
NERtcCallKitContext *context);
|
||||
|
||||
#define kNERtcCallKitBusyCode @"601"
|
||||
|
||||
static const NSUInteger kNERtcCallKitMaxTimeOut = 2 * 60;
|
||||
|
||||
#endif /* NECallEngineConsts_h */
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "NECallEngineConsts.h"
|
||||
#import "NERtcInfo.h"
|
||||
#import "NESignalInfo.h"
|
||||
#import "NEUserInfo.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NECallInfo : NSObject
|
||||
|
||||
/// 呼叫通话唯一Id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
/// 当前用户IM accId
|
||||
@property(nonatomic, strong) NSString *currentAccId;
|
||||
|
||||
/// 主叫方信息
|
||||
@property(nonatomic, strong) NEUserInfo *callerInfo;
|
||||
|
||||
/// 被叫方信息
|
||||
@property(nonatomic, strong) NEUserInfo *calleeInfo;
|
||||
|
||||
/// 通话类型,1 音频,2 视频
|
||||
@property(nonatomic, assign) NECallType callType;
|
||||
|
||||
/// 信令配置相关参数
|
||||
@property(nonatomic, strong) NESignalInfo *signalInfo;
|
||||
|
||||
/// 音视频频道相关信息
|
||||
@property(nonatomic, strong) NERtcInfo *rtcInfo;
|
||||
|
||||
/// 0 空闲,1 呼叫中 2 正在被呼叫 3 通话中
|
||||
@property(nonatomic, assign) NECallEngineStatus callStatus;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,36 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <NERtcSDK/NERtcSDK.h>
|
||||
#import "NECallEngineConsts.h"
|
||||
#import "NECallPushConfig.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NECallParam : NSObject
|
||||
|
||||
/// 用户id
|
||||
@property(nonatomic, strong) NSString *accId;
|
||||
|
||||
/// 自定义信息
|
||||
@property(nonatomic, strong, nullable) NSString *extraInfo;
|
||||
|
||||
/// RTC房间号
|
||||
@property(nonatomic, strong, nullable) NSString *rtcChannelName;
|
||||
|
||||
/// 全局抄送信息
|
||||
@property(nonatomic, strong, nullable) NSString *globalExtraCopy;
|
||||
|
||||
/// 通话类型
|
||||
@property(nonatomic, assign) NECallType callType;
|
||||
|
||||
/// 推送配置
|
||||
@property(nonatomic, strong, nullable) NECallPushConfig *pushConfig;
|
||||
|
||||
- (instancetype)initWithAccId:(NSString *)accId withCallType:(NECallType)callType;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NECallPushConfig : NSObject
|
||||
|
||||
/// 推送标题
|
||||
@property(nonatomic, strong) NSString *pushTitle;
|
||||
|
||||
/// 推送内容
|
||||
@property(nonatomic, strong) NSString *pushContent;
|
||||
|
||||
/// 推送自定义字段
|
||||
@property(nonatomic, strong) NSMutableDictionary *pushPayload;
|
||||
|
||||
/// 是否计入未读计数,默认YES
|
||||
@property(nonatomic, assign) BOOL needBadge;
|
||||
|
||||
/// 是否需要推送,YES表示推送,NO表示不推送,默认YES
|
||||
@property(nonatomic, assign) BOOL needPush;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "NECallEngineConsts.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NECallTypeChangeInfo : NSObject
|
||||
|
||||
/// 音视频类型,1 音频 2 视频
|
||||
@property(nonatomic, assign) NECallType callType;
|
||||
|
||||
/// 1 申请切换 2 同意切换 3 拒绝切换
|
||||
@property(nonatomic, assign) NECallSwitchState state;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "GroupCallMember.h"
|
||||
#import "GroupHeader.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEGroupCallInfo : NSObject
|
||||
|
||||
/// 通话id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
/// 主叫信息
|
||||
@property(nonatomic, strong) GroupCallMember *callerInfo;
|
||||
|
||||
/// 被叫列表
|
||||
@property(nonatomic, strong) NSArray<GroupCallMember *> *calleeList;
|
||||
|
||||
/// 群id
|
||||
@property(nonatomic, strong) NSString *groupId;
|
||||
|
||||
/// 群类型
|
||||
@property(nonatomic, assign) NSInteger groupType;
|
||||
|
||||
/// 邀请模式,GroupInviteMode
|
||||
@property(nonatomic, assign) NSInteger inviteMode;
|
||||
|
||||
/// 加入模式,GroupJoinMode
|
||||
@property(nonatomic, assign) NSInteger joinMode;
|
||||
|
||||
/// 通话开始时间
|
||||
@property(nonatomic, assign) NSInteger startTimestamp;
|
||||
|
||||
/// 自定义信息
|
||||
@property(nonatomic, strong) NSString *extraInfo;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,107 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <NERtcSDK/NERtcSDK.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
#import "GroupCallParam.h"
|
||||
#import "GroupCallResult.h"
|
||||
#import "NEGroupCallInfo.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol NEGroupCallKitDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
/// 收到邀请的回调
|
||||
- (void)onGroupInvitedWithInfo:(NEGroupCallInfo *)info;
|
||||
|
||||
/// 用户列表变更回调
|
||||
- (void)onGroupUserDidChange:(NSArray<GroupCallMember *> *)members;
|
||||
|
||||
/// 通话结束
|
||||
- (void)onGroupEndCallWithReason:(NSInteger)reason withCallId:(NSString *)callId;
|
||||
|
||||
/// 挂断
|
||||
- (void)onGroupHangupWithReason:(NSString *)reason;
|
||||
|
||||
/// 发生异常
|
||||
- (void)onGroupError:(NSError *)error;
|
||||
|
||||
/// 远端用户视频开启/关闭变更
|
||||
- (void)onGroupRemoteUserOpenVideo:(uint64_t)uid withOpen:(BOOL)isOpen;
|
||||
|
||||
@end
|
||||
|
||||
@interface NEGroupCallKit : NSObject <NIMSDKConfigDelegate>
|
||||
|
||||
@property(nonatomic, strong, readonly) NSString *callId;
|
||||
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/// 多人音视频呼叫
|
||||
/// @param param 呼叫入参
|
||||
/// @param completion 回调
|
||||
- (void)groupCall:(GroupCallParam *)param
|
||||
completion:(nullable void (^)(NSError *_Nullable error,
|
||||
GroupCallResult *_Nullable result))completion;
|
||||
|
||||
/// 挂断
|
||||
/// @param param 挂断入参
|
||||
/// @param completion 回调
|
||||
- (void)groupHangup:(GroupHangupParam *)param
|
||||
completion:(nullable void (^)(NSError *_Nullable error,
|
||||
GroupHangupResult *_Nullable result))completion;
|
||||
|
||||
/// 接受呼叫邀请
|
||||
/// @param param 接受入参
|
||||
/// @param completion 回调
|
||||
- (void)groupAccept:(GroupAcceptParam *)param
|
||||
completion:(nullable void (^)(NSError *_Nullable error,
|
||||
GroupAcceptResult *_Nullable result))completion;
|
||||
|
||||
/// 邀请他人加入多人通话
|
||||
/// @param param 邀请入参
|
||||
/// @param completion 回调
|
||||
- (void)groupInvite:(GroupInviteParam *)param
|
||||
completion:(nullable void (^)(NSError *_Nullable error,
|
||||
GroupInviteResult *_Nullable result))completion;
|
||||
|
||||
/// 主动加入多人通话
|
||||
/// @param param 加入入参
|
||||
/// @param completion 回调
|
||||
- (void)groupJoin:(GroupJoinParam *)param
|
||||
completion:(nullable void (^)(NSError *_Nullable error,
|
||||
GroupJoinResult *_Nullable result))completion;
|
||||
|
||||
/// 查询多人通话信息
|
||||
/// @param param 查询入参
|
||||
/// @param completion 回调
|
||||
- (void)groupQueryCallInfo:(GroupQueryCallInfoParam *)param
|
||||
completion:
|
||||
(nullable void (^)(NSError *_Nullable error,
|
||||
GroupQueryCallInfoResult *_Nullable result))completion;
|
||||
|
||||
/// 查询多人通话成员列表
|
||||
/// @param param 查询入参
|
||||
/// @param completion 回调
|
||||
- (void)groupQueryMembers:(GroupQueryMembersParam *)param
|
||||
completion:(nullable void (^)(NSError *_Nullable error,
|
||||
GroupQueryMembersResult *_Nullable result))completion;
|
||||
|
||||
/// 多人通话设置
|
||||
/// @param param 设置参数
|
||||
- (void)setupGroupCall:(GroupConfigParam *)param;
|
||||
|
||||
/// 添加代理 接受回调
|
||||
/// @param delegate 代理对象
|
||||
- (void)addDelegate:(id<NEGroupCallKitDelegate>)delegate;
|
||||
|
||||
/// 移除代理
|
||||
/// @param delegate 代理对象
|
||||
- (void)removeDelegate:(id<NEGroupCallKitDelegate>)delegate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,38 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "GroupCallMember.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEGroupInfo : NSObject
|
||||
|
||||
/// 通话id
|
||||
@property(nonatomic, strong) NSString *callId;
|
||||
|
||||
/// 主叫信息
|
||||
@property(nonatomic, strong) GroupCallMember *callerInfo;
|
||||
|
||||
/// 群id
|
||||
@property(nonatomic, strong) NSString *groupId;
|
||||
|
||||
/// 群类型
|
||||
@property(nonatomic, assign) NSInteger groupType;
|
||||
|
||||
/// 邀请模式,GroupInviteMode
|
||||
@property(nonatomic, assign) NSInteger inviteMode;
|
||||
|
||||
/// 加入模式,GroupJoinMode
|
||||
@property(nonatomic, assign) NSInteger joinMode;
|
||||
|
||||
/// 通话开始时间
|
||||
@property(nonatomic, assign) NSInteger startTimestamp;
|
||||
|
||||
/// 自定义信息
|
||||
@property(nonatomic, strong) NSString *extraInfo;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,20 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
// #import "NERtcCallKitConsts.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEHangupParam : NSObject
|
||||
|
||||
/// 信令通道id
|
||||
@property(nonatomic, strong) NSString *channelId;
|
||||
|
||||
/// 用户自定义信息
|
||||
@property(nonatomic, strong, nullable) NSString *extraString;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,26 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "NECallEngineConsts.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEInviteInfo : NSObject
|
||||
|
||||
/// 呼叫者的accId
|
||||
@property(nonatomic, strong) NSString *callerAccId;
|
||||
|
||||
/// 呼叫类型 1 音频 2 视频
|
||||
@property(nonatomic, assign) NECallType callType;
|
||||
|
||||
/// 用户自定义信息(主叫发送被叫接收)
|
||||
@property(nonatomic, strong) NSString *extraInfo;
|
||||
|
||||
/// 信令通道id
|
||||
@property(nonatomic, strong) NSString *channelId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
#import "NECallEngineConsts.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NERecordConfig : NSObject
|
||||
|
||||
/// 话单接收者accId
|
||||
@property(nonatomic, strong) NSString *accId;
|
||||
|
||||
/// 配置话单中的通话类型 1 音频 2 视频
|
||||
@property(nonatomic, assign) NECallType callType;
|
||||
|
||||
/// 话单类型, 1 通话完成 2 通话取消 3 通话拒绝 4 超时未接听 5 对方忙线
|
||||
@property(nonatomic, assign) NIMRtcCallStatus callState;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#else
|
||||
#ifndef FOUNDATION_EXPORT
|
||||
#if defined(__cplusplus)
|
||||
#define FOUNDATION_EXPORT extern "C"
|
||||
#else
|
||||
#define FOUNDATION_EXPORT extern
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#import "NECallEngine.h"
|
||||
#import "NECallEngineConsts.h"
|
||||
#import "NEGroupCallKit.h"
|
||||
#import "NERtcCallKit.h"
|
||||
#import "NERtcCallKitConsts.h"
|
||||
#import "NERtcCallKitContext.h"
|
||||
#import "NERtcCallKitJoinChannelEvent.h"
|
||||
#import "NERtcCallKitPushConfig.h"
|
||||
#import "NERtcCallOptions.h"
|
||||
#import "GroupCallMember.h"
|
||||
#import "GroupCallParam.h"
|
||||
#import "GroupCallResult.h"
|
||||
#import "GroupHeader.h"
|
||||
#import "NEGroupCallInfo.h"
|
||||
#import "NEGroupInfo.h"
|
||||
#import "NECallConfig.h"
|
||||
#import "NECallConnectedInfo.h"
|
||||
#import "NECallEndInfo.h"
|
||||
#import "NECallInfo.h"
|
||||
#import "NECallParam.h"
|
||||
#import "NECallPushConfig.h"
|
||||
#import "NECallTypeChangeInfo.h"
|
||||
#import "NEHangupParam.h"
|
||||
#import "NEInviteInfo.h"
|
||||
#import "NERecordConfig.h"
|
||||
#import "NERtcInfo.h"
|
||||
#import "NESetupConfig.h"
|
||||
#import "NESignalInfo.h"
|
||||
#import "NESwitchParam.h"
|
||||
#import "NEUserInfo.h"
|
||||
|
||||
FOUNDATION_EXPORT double NERtcCallKitVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char NERtcCallKitVersionString[];
|
||||
|
||||
@@ -0,0 +1,384 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "NECallEngine.h"
|
||||
#import "NECallEngineConsts.h"
|
||||
#import "NEGroupCallKit.h"
|
||||
#import "NERtcCallKitConsts.h"
|
||||
#import "NERtcCallKitContext.h"
|
||||
#import "NERtcCallKitJoinChannelEvent.h"
|
||||
#import "NERtcCallKitPushConfig.h"
|
||||
#import "NERtcCallOptions.h"
|
||||
// #import "NERtcCallKitDelegate.h"
|
||||
|
||||
//! Project version number for NERtcCallKit.
|
||||
// FOUNDATION_EXPORT double NERtcCallKitVersionNumber;
|
||||
|
||||
//! Project version string for NERtcCallKit.
|
||||
// FOUNDATION_EXPORT const unsigned char NERtcCallKitVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like
|
||||
// #import <NERtcCallKit/PublicHeader.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^NERtcCallKitRecordMessageHander)(NIMMessage *message);
|
||||
|
||||
@protocol NERtcCallKitDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
/// 收到邀请的回调
|
||||
/// @param invitor 邀请方
|
||||
/// @param userIDs 房间中的被邀请的所有人(不包含邀请者)
|
||||
/// @param isFromGroup 是否是群组
|
||||
/// @param groupID 群组ID
|
||||
/// @param type 通话类型
|
||||
- (void)onInvited:(NSString *)invitor
|
||||
userIDs:(NSArray<NSString *> *)userIDs
|
||||
isFromGroup:(BOOL)isFromGroup
|
||||
groupID:(nullable NSString *)groupID
|
||||
type:(NERtcCallType)type
|
||||
NERtcCallKitDeprecate("use -onInvited:userIDs:isFromGroup:groupID:type:attachment: instead");
|
||||
|
||||
/// 收到邀请的回调
|
||||
/// @param invitor 邀请方
|
||||
/// @param userIDs 房间中的被邀请的所有人(不包含邀请者)
|
||||
/// @param isFromGroup 是否是群组
|
||||
/// @param groupID 群组ID
|
||||
/// @param type 通话类型
|
||||
- (void)onInvited:(NSString *)invitor
|
||||
userIDs:(NSArray<NSString *> *)userIDs
|
||||
isFromGroup:(BOOL)isFromGroup
|
||||
groupID:(nullable NSString *)groupID
|
||||
type:(NERtcCallType)type
|
||||
attachment:(nullable NSString *)attachment;
|
||||
|
||||
/// 接受邀请的回调
|
||||
/// @param userID 接受者
|
||||
- (void)onUserEnter:(NSString *)userID;
|
||||
|
||||
/// 拒绝邀请的回调
|
||||
/// @param userID 拒绝者
|
||||
- (void)onUserReject:(NSString *)userID;
|
||||
|
||||
/// 取消邀请的回调
|
||||
/// @param userID 邀请方
|
||||
- (void)onUserCancel:(NSString *)userID;
|
||||
|
||||
/// 用户离开的回调.
|
||||
/// @param userID 用户userID
|
||||
- (void)onUserLeave:(NSString *)userID;
|
||||
|
||||
/// 用户异常离开的回调
|
||||
/// @param userID 用户userID
|
||||
- (void)onUserDisconnect:(NSString *)userID;
|
||||
|
||||
/// 用户接受邀请的回调
|
||||
/// @param userID 用户userID
|
||||
- (void)onUserAccept:(NSString *)userID;
|
||||
|
||||
/// 忙线
|
||||
/// @param userID 忙线的用户ID
|
||||
- (void)onUserBusy:(NSString *)userID;
|
||||
|
||||
/// 通话类型切换的回调(仅1对1呼叫有效)
|
||||
/// @param callType 切换后的类型
|
||||
/// @param state 切换应答类型: 邀请/同意/拒绝
|
||||
- (void)onCallTypeChange:(NERtcCallType)callType withState:(NERtcSwitchState)state;
|
||||
|
||||
/// 通话类型切换的回调(仅1对1呼叫有效)
|
||||
/// @param callType 切换后的类型
|
||||
- (void)onCallTypeChange:(NERtcCallType)callType
|
||||
NERtcCallKitDeprecate("use -onCallTypeChange:withState: instead");
|
||||
|
||||
/// 通话结束
|
||||
- (void)onCallEnd;
|
||||
|
||||
/// 呼叫超时
|
||||
- (void)onCallingTimeOut;
|
||||
|
||||
/// 连接断开
|
||||
/// @param reason 断开原因
|
||||
- (void)onDisconnect:(NSError *)reason;
|
||||
|
||||
/// 发生错误
|
||||
- (void)onError:(NSError *)error;
|
||||
|
||||
/// 启用/禁用相机
|
||||
/// @param available 是否可用
|
||||
/// @param userID 用户ID
|
||||
- (void)onCameraAvailable:(BOOL)available userID:(NSString *)userID;
|
||||
|
||||
/// 启用/禁用麦克风
|
||||
/// @param available 是否可用
|
||||
/// @param userID 用户userID
|
||||
- (void)onAudioAvailable:(BOOL)available userID:(NSString *)userID;
|
||||
|
||||
/// 视频采集变更回调
|
||||
/// @param muted 是否关闭采集
|
||||
/// @param userID 用户ID
|
||||
- (void)onVideoMuted:(BOOL)muted userID:(NSString *)userID;
|
||||
|
||||
/// 音频采集变更回调
|
||||
/// @param muted 是否关闭采集
|
||||
/// @param userID 用户ID
|
||||
- (void)onAudioMuted:(BOOL)muted userID:(NSString *)userID;
|
||||
|
||||
/// 自己加入成功的回调,通常用来上报、统计等
|
||||
/// @param event 回调参数
|
||||
- (void)onJoinChannel:(NERtcCallKitJoinChannelEvent *)event;
|
||||
|
||||
/// 首帧解码成功的回调
|
||||
/// @param userID 用户id
|
||||
/// @param width 宽度
|
||||
/// @param height 高度
|
||||
- (void)onFirstVideoFrameDecoded:(NSString *)userID width:(uint32_t)width height:(uint32_t)height;
|
||||
|
||||
/// 网络状态监测回调
|
||||
/// @param stats key为用户ID, value为对应网络状态
|
||||
- (void)onUserNetworkQuality:(NSDictionary<NSString *, NERtcNetworkQualityStats *> *)stats;
|
||||
|
||||
/// 呼叫请求已被其他端接收的回调
|
||||
- (void)onOtherClientAccept;
|
||||
|
||||
/// 呼叫请求已被其他端拒绝的回调
|
||||
- (void)onOtherClientReject;
|
||||
|
||||
/// 远端用户暂停或恢复发送视频流回调。
|
||||
- (void)onNERtcEngineUser:(uint64_t)userID videoMuted:(BOOL)muted;
|
||||
|
||||
- (void)onNERtcEngineUserVideoDidStartWithUserID:(uint64_t)userID
|
||||
videoProfile:(NERtcVideoProfileType)profile;
|
||||
|
||||
- (void)onRtcInitEnd;
|
||||
|
||||
@end
|
||||
|
||||
@interface NERtcCallKit : NSObject
|
||||
|
||||
/// 通话状态
|
||||
@property(nonatomic, assign, readonly) NERtcCallStatus callStatus;
|
||||
|
||||
/// 单位:秒,IM服务器邀请2分钟后无响应为超时,最大值不超过2分钟。
|
||||
@property(nonatomic, assign) NSTimeInterval timeOutSeconds;
|
||||
|
||||
/// 安全模式音视频房间token获取,nil表示非安全模式. Block中一定要调用complete
|
||||
@property(nonatomic, copy, nullable) NERtcCallKitTokenHandler tokenHandler;
|
||||
|
||||
/// 推送配置定制化,修改config.pushTitle,config.pushContent来完成。需要的上下文内容在context对象中提供。
|
||||
@property(nonatomic, copy, nullable) NERtcCallKitPushConfigHandler pushConfigHandler;
|
||||
|
||||
/// 话单自定义回调,如果需要修发送话单内容可以在此回调中修改message相关字段
|
||||
@property(nonatomic, copy, nullable) NERtcCallKitRecordMessageHander recordHandler;
|
||||
|
||||
/// NERtcEngine 的回调接口,由用户提供
|
||||
@property(nonatomic, weak) id<NERtcEngineDelegateEx> engineDelegate;
|
||||
|
||||
/// 中转NERtcEngine统计回调
|
||||
@property(nonatomic, weak) id<NERtcEngineMediaStatsObserver> observer;
|
||||
|
||||
/// 单例
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/// 初始化,所有功能需要先初始化
|
||||
/// @param appKey 云信后台注册的appKey
|
||||
- (void)setupAppKey:(NSString *)appKey options:(nullable NERtcCallOptions *)options;
|
||||
|
||||
/// 初始化,所有功能需要先初始化
|
||||
/// @param appKey 云信后台注册的appKey
|
||||
/// @param rtcUid 用户自定义rtc uid,如果不需要自定义传入 <= 0 任意整数(或者使用-
|
||||
/// (void)setupAppKey:(NSString *)appKey options:(nullable NERtcCallOptions *)options
|
||||
/// 初始化接口),内部自动生成,如果初始化传入会优先使用外部传入
|
||||
- (void)setupAppKey:(NSString *)appKey
|
||||
withRtcUid:(uint64_t)rtcUid
|
||||
options:(nullable NERtcCallOptions *)options;
|
||||
|
||||
/// 初始化,所有功能需要先初始化,支持私有化
|
||||
/// @param appKey 云信后台注册的appKey
|
||||
/// @param options IM 推送配置,Rtc是否初始化
|
||||
/// @param context Rtc初始化配置,私有化参数配置
|
||||
- (void)setupAppKey:(NSString *)appKey
|
||||
options:(nullable NERtcCallOptions *)options
|
||||
withContext:(nonnull NERtcEngineContext *)context;
|
||||
|
||||
/// 登录IM接口,所有功能需要先进行登录后才能使用
|
||||
/// @param userID IM用户accid
|
||||
/// @param token IM用户token
|
||||
/// @param completion 回调
|
||||
- (void)login:(NSString *)userID
|
||||
token:(NSString *)token
|
||||
completion:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 更新APNS deviceToken
|
||||
/// @param deviceToken 注册获得的deviceToken
|
||||
- (void)updateApnsToken:(NSData *)deviceToken;
|
||||
|
||||
/// 更新 PushKit Token
|
||||
/// @param pushkitToken 目前仅支持 PKPushTypeVoIP
|
||||
- (void)updatePushKitToken:(NSData *)pushkitToken;
|
||||
|
||||
/// 登出
|
||||
- (void)logout:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 开始呼叫
|
||||
/// @param userID 呼叫的用户ID
|
||||
/// @param type 通话类型
|
||||
/// @param completion 回调
|
||||
- (void)call:(NSString *)userID
|
||||
type:(NERtcCallType)type
|
||||
completion:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 开始呼叫
|
||||
/// @param userID 呼叫的用户ID
|
||||
/// @param type 通话类型 {@link NERtcCallKitConsts => NERtcCallType}
|
||||
/// @param attachment 附件信息,透传到onInvited
|
||||
/// @param completion 回调
|
||||
- (void)call:(NSString *)userID
|
||||
type:(NERtcCallType)type
|
||||
attachment:(nullable NSString *)attachment
|
||||
completion:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 开始呼叫
|
||||
/// @param userID 呼叫的用户ID
|
||||
/// @param type 通话类型 {@link NERtcCallKitConsts => NERtcCallType}
|
||||
/// @param attachment 附件信息,透传到onInvited
|
||||
/// @param extra 扩展
|
||||
/// @param completion 回调
|
||||
- (void)call:(NSString *)userID
|
||||
type:(NERtcCallType)type
|
||||
attachment:(nullable NSString *)attachment
|
||||
globalExtra:(nullable NSString *)extra
|
||||
completion:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 开始呼叫
|
||||
/// @param userID 呼叫的用户ID
|
||||
/// @param type 通话类型 {@link NERtcCallKitConsts => NERtcCallType}
|
||||
/// @param attachment 附件信息,透传到onInvited
|
||||
/// @param extra 全局抄送
|
||||
/// @param token 安全模式token,如果用户直接传入,不需要实现 tokenHandler block回调
|
||||
/// @param channelName 自定义channelName,不传会默认生成
|
||||
/// @param completion 回调
|
||||
- (void)call:(NSString *)userID
|
||||
type:(NERtcCallType)type
|
||||
attachment:(nullable NSString *)attachment
|
||||
globalExtra:(nullable NSString *)extra
|
||||
withToken:(nullable NSString *)token
|
||||
channelName:(nullable NSString *)channelName
|
||||
completion:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 取消呼叫
|
||||
/// @param completion 回调
|
||||
- (void)cancel:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 接受呼叫
|
||||
/// @param completion 回调
|
||||
- (void)accept:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 接受呼叫
|
||||
/// @param token 用户token,如果用户直接传入,不需要实现 tokenHandler block回调
|
||||
/// @param completion 回调
|
||||
- (void)acceptWithToken:(nullable NSString *)token
|
||||
withCompletion:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 拒绝呼叫
|
||||
/// @param completion 回调
|
||||
- (void)reject:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 拒绝呼叫
|
||||
/// @param completion 回调
|
||||
/// @param reason 挂断原因
|
||||
- (void)rejectWithReason:(NSInteger)reason
|
||||
withCompletion:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 挂断
|
||||
/// @param completion 回调
|
||||
- (void)hangup:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 设置自己画面
|
||||
/// @param localView 渲染自己画面的View
|
||||
/// @discussion localView上不建议有任何subview
|
||||
- (void)setupLocalView:(nullable UIView *)localView;
|
||||
|
||||
/// 设置其他用户画面
|
||||
/// @param remoteView 渲染其他画面的View
|
||||
/// @param userID 其他用户ID
|
||||
/// @discussion remoteView上不建议有任何subview
|
||||
- (void)setupRemoteView:(nullable UIView *)remoteView forUser:(nullable NSString *)userID;
|
||||
|
||||
/// 启动或关闭摄像头
|
||||
/// @param enable YES:启动,NO:关闭
|
||||
/// @return 操作返回值,成功则返回 0
|
||||
- (int)enableLocalVideo:(BOOL)enable;
|
||||
|
||||
/// 开启或关闭视频采集
|
||||
/// @param muted YES:关闭,NO:开启
|
||||
/// @return 操作返回值,成功则返回 0
|
||||
- (int)muteLocalVideo:(BOOL)muted;
|
||||
|
||||
/// 切换摄像头
|
||||
/// @return 操作返回值,成功则返回 0
|
||||
- (int)switchCamera;
|
||||
|
||||
/// 麦克风静音
|
||||
/// @param mute YES:静音 NO:开启
|
||||
/// @return 操作返回值,成功则返回 0
|
||||
- (int)muteLocalAudio:(BOOL)mute;
|
||||
|
||||
/// 在通话过程中切换通话类型。非通话过程中调用无效。仅支持1对1通话。
|
||||
/// @param type 通话类型: 音频/视频
|
||||
/// @param state 切换应答类型: 邀请/同意/拒绝
|
||||
/// @param completion 回调
|
||||
/// @discussion
|
||||
/// 切换完成后,组件内部会将己端和对端调用-enableLocalVideo:,此时外部不建议再调用-enableLocalVideo:,防止状态错乱.
|
||||
- (void)switchCallType:(NERtcCallType)type
|
||||
withState:(NERtcSwitchState)state
|
||||
completion:(nullable void (^)(NSError *_Nullable error))completion;
|
||||
|
||||
/// 是否使用扬声器模式
|
||||
/// @param speaker YES:扬声器 NO:听筒
|
||||
/// @param error 错误,成功为nil
|
||||
- (void)setLoudSpeakerMode:(BOOL)speaker error:(NSError *_Nonnull *_Nonnull)error;
|
||||
|
||||
/// 指定对某个用户静音。
|
||||
/// @param mute 是否静音
|
||||
/// @param userID 用户ID
|
||||
/// @param error 错误,成功为nil
|
||||
/// @discussion 只能不接收指定用户的音频,并不影响房间中其他人接受该用户的音频
|
||||
- (void)setAudioMute:(BOOL)mute forUser:(NSString *)userID error:(NSError *_Nonnull *_Nonnull)error;
|
||||
|
||||
/// 根据uid 获取 accid
|
||||
/// @param uid 用户id
|
||||
/// @discussion 只有在通话中才能通过uid获取accid
|
||||
- (void)memberOfUid:(uint64_t)uid
|
||||
completion:(nullable void (^)(NIMSignalingMemberInfo *_Nullable info))completion;
|
||||
|
||||
/// 根据uid 获取 accid
|
||||
/// @param accid IM 用户id
|
||||
/// @discussion 只有在通话中才能通过accid获取获取uid
|
||||
- (void)memberOfAccid:(NSString *)accid
|
||||
completion:(nullable void (^)(NIMSignalingMemberInfo *_Nullable info))completion;
|
||||
|
||||
/// 添加代理 接受回调
|
||||
/// @param delegate 代理对象
|
||||
- (void)addDelegate:(id<NERtcCallKitDelegate>)delegate;
|
||||
|
||||
/// 移除代理
|
||||
/// @param delegate 代理对象
|
||||
- (void)removeDelegate:(id<NERtcCallKitDelegate>)delegate;
|
||||
|
||||
/// 音视频切换是否需要确认配置
|
||||
/// @param video 切换到视频是否需要确认
|
||||
/// @param audio 切换到音频是否需要确认
|
||||
- (void)enableSwitchCallTypeConfirmVideo:(BOOL)video audio:(BOOL)audio;
|
||||
|
||||
/// 版本号
|
||||
+ (NSString *)versionCode;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef NERtcCallKitConsts_h
|
||||
#define NERtcCallKitConsts_h
|
||||
|
||||
#define NERtcCallKitDeprecate(msg) __attribute__((deprecated(msg)))
|
||||
|
||||
#endif /* NERtcCallKitConsts_h */
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "NECallEngineConsts.h"
|
||||
#import "NERtcCallKitConsts.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NERtcCallKitContext : NSObject
|
||||
|
||||
/// appKey
|
||||
@property(nonatomic, copy) NSString *appKey;
|
||||
|
||||
/// 是否是群组呼叫
|
||||
@property(nonatomic, assign) BOOL isGroupCall;
|
||||
|
||||
/// 当前群组呼叫的groupID
|
||||
@property(nonatomic, copy, nullable) NSString *groupID;
|
||||
|
||||
/// 当前用户IM accid
|
||||
@property(nonatomic, copy) NSString *myAccid;
|
||||
|
||||
/// 当前用户音视频房间uid
|
||||
@property(nonatomic, assign) uint64_t myUid;
|
||||
|
||||
/// 当前用户的显示名称
|
||||
@property(nonatomic, copy) NSString *myDisplayName;
|
||||
|
||||
/// 1to1专用字段,对方accid. 群组呼叫下无效。
|
||||
@property(nonatomic, copy, nullable) NSString *remoteAccid;
|
||||
|
||||
/// 音视频房间名
|
||||
@property(nonatomic, copy) NSString *cname;
|
||||
|
||||
/// 呼叫类型。视频/音频
|
||||
@property(nonatomic, assign) NERtcCallType callType;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NERtcCallKitJoinChannelEvent : NSObject
|
||||
|
||||
/// IM userID
|
||||
@property(nonatomic, copy) NSString *accid;
|
||||
|
||||
/// 音视频用户id
|
||||
@property(nonatomic, assign) uint64_t uid;
|
||||
|
||||
/// 音视频channelId
|
||||
@property(nonatomic, assign) uint64_t cid;
|
||||
|
||||
/// 音视频channelName
|
||||
@property(nonatomic, copy) NSString *cname;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NERtcCallKitPushConfig : NSObject
|
||||
|
||||
/// 推送标题,可修改
|
||||
@property(nonatomic, copy) NSString *pushTitle;
|
||||
|
||||
/// 推送内容,可修改
|
||||
@property(nonatomic, copy) NSString *pushContent;
|
||||
|
||||
/// 推送payload内容,可自行添加键值对
|
||||
@property(nonatomic, strong, readonly) NSMutableDictionary *pushPayload;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NERtcCallOptions : NSObject
|
||||
|
||||
/// 推送证书名称
|
||||
@property(nonatomic, copy) NSString *APNSCerName;
|
||||
|
||||
/// 呼叫推送证书名称
|
||||
@property(nonatomic, copy) NSString *VoIPCerName;
|
||||
|
||||
/// 被叫是否自动加入channel
|
||||
@property(nonatomic, assign) BOOL supportAutoJoinWhenCalled;
|
||||
|
||||
/// 是否关闭话单,默认NO不关闭
|
||||
@property(nonatomic, assign) BOOL disableRecord;
|
||||
|
||||
/// 主叫是否在呼叫时加入rtc,默认为NO,不提前加入,在被叫接听时加入,如设置提前加入房间会带来通话费用的增加,同时提升首帧开画时间
|
||||
@property(nonatomic, assign) BOOL joinRtcWhenCall;
|
||||
|
||||
/// 是否在初始化的时候初始化Rtc,默认为YES,设置为NO,主叫在呼叫时初始化,被叫在有呼叫到达的时候初始化
|
||||
@property(nonatomic, assign) BOOL globalInit;
|
||||
|
||||
/// 是否初始化呼叫组件日志
|
||||
@property(nonatomic, assign) BOOL isDisableLog;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NERtcInfo : NSObject
|
||||
|
||||
/// rtc 频道名
|
||||
@property(nonatomic, strong) NSString *channelName;
|
||||
|
||||
/// rtc token
|
||||
@property(nonatomic, strong) NSString *token;
|
||||
|
||||
/// rtc uid
|
||||
@property(nonatomic, assign) long channelId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "NECallEngineConsts.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NESetupConfig : NSObject
|
||||
|
||||
/// app key , 管理后台申请
|
||||
@property(nonatomic, strong) NSString *appkey;
|
||||
|
||||
/// Rtc私有化配置初始化对象,不需要私有化可空
|
||||
@property(nonatomic, strong, nullable) NERtcEngineContext *rtcInfo;
|
||||
|
||||
/// 被叫是否自动加入channel,默认不加入
|
||||
@property(nonatomic, assign) BOOL enableAutoJoinSignalChannel;
|
||||
|
||||
/// 主叫是否在呼叫时加入Rtc,默认不提前加入
|
||||
@property(nonatomic, assign) BOOL enableJoinRtcWhenCall;
|
||||
|
||||
/// 是否在初始化的时候初始化Rtc,默认初始化(Web无此配置)
|
||||
@property(nonatomic, assign) NECallInitRtcMode initRtcMode;
|
||||
|
||||
/// 当前用户rtcUid
|
||||
@property(nonatomic, assign) uint64_t currentUserUid;
|
||||
|
||||
/// 组件平台信息,开发者无需关心
|
||||
@property(nonatomic, copy) NSString *framework;
|
||||
|
||||
/// 组件平台信息,开发者无需关心
|
||||
@property(nonatomic, copy) NSString *channel;
|
||||
|
||||
- (instancetype)initWithAppkey:(NSString *)appkey;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NESignalInfo : NSObject
|
||||
|
||||
/// 信令频道Id
|
||||
@property(nonatomic, strong) NSString *channelId;
|
||||
|
||||
/// 信令邀请唯一标识
|
||||
@property(nonatomic, strong) NSString *requestId;
|
||||
|
||||
/// 信令通道名称
|
||||
@property(nonatomic, strong) NSString *channelName;
|
||||
|
||||
/// 扩展信息,透传到到被叫onReceiveInvited
|
||||
@property(nonatomic, strong) NSString *extraInfo;
|
||||
|
||||
/// 定义的呼叫全局抄送信息,用户服务端接收抄送时设置自己的业务标识
|
||||
@property(nonatomic, strong) NSString *globalExtraCopy;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "NECallEngineConsts.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NESwitchParam : NSObject
|
||||
|
||||
/// 通话类型
|
||||
@property(nonatomic, assign) NECallType callType;
|
||||
|
||||
/// 切换状态,在开启音视频切换需确认配置条件下 1 发起切换请求 2 同意切换 3 拒绝切换
|
||||
@property(nonatomic, assign) NECallSwitchState state;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEUserInfo : NSObject
|
||||
|
||||
/// 用户 accid
|
||||
@property(nonatomic, strong) NSString *accId;
|
||||
|
||||
/// 用户rtc uid
|
||||
@property(nonatomic, assign) UInt64 uid;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
framework module NERtcCallKit {
|
||||
umbrella header "NERtcCallKit-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user