10.9提交
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// 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 "NECallUIStateController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEAudioCallingController : NECallUIStateController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// 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 "NECallUIStateController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEAudioInCallController : NECallUIStateController
|
||||
|
||||
@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 <AVKit/AVKit.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEBufferDisplayView : UIView
|
||||
|
||||
- (AVSampleBufferDisplayLayer *)getLayer;
|
||||
|
||||
@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 "NECallUIKitConfig.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NECallKitUtil : NSObject
|
||||
|
||||
+ (UIColor *)colorWithHexString:(NSString *)hexString;
|
||||
|
||||
+ (NSString *)localizableWithKey:(NSString *)key;
|
||||
|
||||
+ (void)setLanguage:(NECallUILanguage)language;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
// 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 <NERtcCallKit/NERtcCallKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 国际化类型
|
||||
typedef NS_ENUM(NSInteger, NECallUILanguage) {
|
||||
/// 根据系统设置切换
|
||||
NECallUILanguageAuto = 0,
|
||||
/// 简体中文
|
||||
NECallUILanguageZhHans,
|
||||
/// 英文
|
||||
NECallUILanguageEn,
|
||||
};
|
||||
|
||||
@interface NECallUIConfig : NSObject
|
||||
|
||||
/// 是否禁止音频通话转视频通话,默认YES,支持转换
|
||||
@property(nonatomic, assign) BOOL enableAudioToVideo;
|
||||
|
||||
/// 是否禁止音频通话转视频通话,默认YES,支持转换
|
||||
@property(nonatomic, assign) BOOL enableVideoToAudio;
|
||||
|
||||
/// 收到呼叫时是否禁止弹出被叫页面,默认NO,弹出被叫页面,用户可以通过此配置禁止组件弹出,自己通过继承以及监听被叫回调实现相关功能
|
||||
@property(nonatomic, assign) BOOL disableShowCalleeView;
|
||||
|
||||
/// 通话前音视频切换按钮是否显示,默认NO,不显示,开启此配置前需要开启 NERtcCallOptions 中
|
||||
/// supportAutoJoinWhenCalled 属性
|
||||
@property(nonatomic, assign) BOOL showCallingSwitchCallType;
|
||||
|
||||
/// 被叫显示昵称字段还是手机号字段,默认显示昵称
|
||||
@property(nonatomic, assign) BOOL calleeShowPhone;
|
||||
|
||||
/// 默认NO,关闭视频画面的时候使用 muteLocalVideo ,设置为YES时候,UI组件关闭视频时调用
|
||||
/// enableLocalVideo 设置NO来停止本端视频流
|
||||
@property(nonatomic, assign) BOOL useEnableLocalMute;
|
||||
|
||||
/// 是否开启小窗功能,默认不开启
|
||||
@property(nonatomic, assign) BOOL enableFloatingWindow;
|
||||
|
||||
/// 是否开启应用外小窗功能,默认不开启,开启后内部会使用 NECallEngine engineDelegate
|
||||
/// 属性监听Rtc回调,如果已经使用,存在影响,请在外部根据画中画方案实现应用外小窗
|
||||
@property(nonatomic, assign) BOOL enableFloatingWindowOutOfApp;
|
||||
|
||||
/// 是否开启虚化功能,默认NO, 不开启
|
||||
@property(nonatomic, assign) BOOL enableVirtualBackground;
|
||||
|
||||
/// 是否开启被叫预览,默认NO,不开启
|
||||
@property(nonatomic, assign) BOOL enableCalleePreview;
|
||||
|
||||
/// 国际化配置
|
||||
@property(nonatomic, assign) NECallUILanguage language;
|
||||
|
||||
@end
|
||||
|
||||
@interface NECallUIKitConfig : NSObject
|
||||
|
||||
/// 透传 NECallEngine 初始化配置,如果不需要UI组件内部初始化 NECallEngine 则不传此参数即可
|
||||
@property(nonatomic, strong, nullable) NESetupConfig *config;
|
||||
|
||||
/// appkey
|
||||
@property(nonatomic, strong) NSString *appKey;
|
||||
|
||||
/// UI 配置
|
||||
@property(nonatomic, strong) NECallUIConfig *uiConfig;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
// 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 <UIKit/UIKit.h>
|
||||
#import "NECallUIKitConfig.h"
|
||||
#import "NECustomButton.h"
|
||||
#import "NEUICallParam.h"
|
||||
#import "NEVideoOperationView.h"
|
||||
#import "NEVideoView.h"
|
||||
@class NECallViewController;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NECallUIStateController : UIViewController
|
||||
|
||||
/// 视频窗口(小)
|
||||
@property(strong, nonatomic) NEVideoView *smallVideoView;
|
||||
/// 视频窗口(大)
|
||||
@property(strong, nonatomic) NEVideoView *bigVideoView;
|
||||
/// 远端用户头像(主叫状态)
|
||||
@property(strong, nonatomic) UIImageView *remoteAvatorView;
|
||||
/// 远端用户头像(被叫&音频通话模式下使用)
|
||||
@property(strong, nonatomic) UIImageView *remoteBigAvatorView;
|
||||
/// 主叫远端用户显示(正在呼叫xxxxx...)
|
||||
@property(strong, nonatomic) UILabel *titleLabel;
|
||||
/// 远端用户名显示(被叫状态)
|
||||
@property(strong, nonatomic) UILabel *centerTitleLabel;
|
||||
/// 远端操作状态标签(主叫状态)
|
||||
@property(strong, nonatomic) UILabel *subTitleLabel;
|
||||
/// 邀请通话类型&远端状态
|
||||
@property(strong, nonatomic) UILabel *centerSubtitleLabel;
|
||||
|
||||
/// 取消呼叫
|
||||
@property(strong, nonatomic) NECustomButton *cancelBtn;
|
||||
/// 拒绝接听
|
||||
@property(strong, nonatomic) NECustomButton *rejectBtn;
|
||||
/// 接听
|
||||
@property(strong, nonatomic) NECustomButton *acceptBtn;
|
||||
/// 麦克风
|
||||
@property(strong, nonatomic) NECustomButton *microphoneBtn;
|
||||
/// 扬声器
|
||||
@property(strong, nonatomic) NECustomButton *speakerBtn;
|
||||
/// 通话中音视频操作工具栏
|
||||
@property(strong, nonatomic) NEVideoOperationView *operationView;
|
||||
|
||||
/// 呼叫参数
|
||||
@property(nonatomic, weak) NEUICallParam *callParam;
|
||||
/// 配置参数
|
||||
@property(nonatomic, weak) NECallUIConfig *config;
|
||||
|
||||
/// 状态栏高度
|
||||
@property(nonatomic, assign, readonly) CGFloat statusHeight;
|
||||
/// 内部圆角
|
||||
@property(nonatomic, assign, readonly) CGFloat radius;
|
||||
/// 标题字号
|
||||
@property(nonatomic, assign, readonly) CGFloat titleFontSize;
|
||||
/// 子标题字号
|
||||
@property(nonatomic, assign, readonly) CGFloat subTitleFontSize;
|
||||
/// 小屏幕适配系数
|
||||
@property(nonatomic, assign, readonly) CGFloat factor;
|
||||
/// 通话前按钮大小(挂断 接听 取消)
|
||||
@property(nonatomic, assign, readonly) CGSize buttonSize;
|
||||
|
||||
@property(nonatomic, weak) NECallViewController *mainController;
|
||||
|
||||
@property(nonatomic, strong) NSBundle *bundle;
|
||||
|
||||
- (void)setupUI;
|
||||
|
||||
- (void)setupCenterRemoteAvator;
|
||||
|
||||
- (void)setupVideoCallingUI;
|
||||
|
||||
- (void)setupAudioCallingUI;
|
||||
|
||||
- (void)setupCalledUI;
|
||||
|
||||
- (void)setupAudioInCallUI;
|
||||
|
||||
- (NSString *)getInviteText;
|
||||
|
||||
- (void)refreshUI;
|
||||
|
||||
- (void)refreshVideoView;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
// 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 <UIKit/UIKit.h>
|
||||
#import "NERingPlayerManager.h"
|
||||
#import "NEUICallParam.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NECallViewBaseController : UIViewController
|
||||
|
||||
@property(nonatomic, strong, nullable) NEUICallParam *callParam;
|
||||
|
||||
@property(nonatomic, strong) UIPanGestureRecognizer *panGesture;
|
||||
|
||||
@property(nonatomic, assign) CGFloat screenWidth;
|
||||
|
||||
@property(nonatomic, assign) CGFloat screenHeight;
|
||||
|
||||
/// 悬浮窗边距
|
||||
@property(nonatomic, assign) CGFloat floatMargin;
|
||||
|
||||
/// 当前是否是小窗模式
|
||||
@property(nonatomic, assign) BOOL isSmallWindow;
|
||||
|
||||
/// 音频浮窗
|
||||
@property(nonatomic, strong) UIView *audioSmallView;
|
||||
|
||||
/// 音频小窗计时器
|
||||
@property(nonatomic, strong) UILabel *audioSmallViewTimerLabel;
|
||||
|
||||
/// 资源包context
|
||||
@property(nonatomic, strong) NSBundle *bundle;
|
||||
|
||||
/// 小窗模式根视图view。也作为视频通话小窗模式下的远端的预览视图
|
||||
@property(nonatomic, strong) UIView *recoveryView;
|
||||
|
||||
/// 远端关闭视频视图
|
||||
@property(nonatomic, strong) UIView *maskView;
|
||||
|
||||
/// 视频小窗模式下,远端关闭摄像头状态下的头像
|
||||
@property(nonatomic, strong) UIImageView *remoteHeaderImage;
|
||||
|
||||
// 远端视频是否是否关闭
|
||||
@property(nonatomic, assign) BOOL isRemoteMute;
|
||||
|
||||
@property(nonatomic, assign) SEL createPipSEL;
|
||||
|
||||
@property(nonatomic, assign) SEL stopPipSEL;
|
||||
|
||||
/// 只用于跟未接通原因(话单)相关的toast,可根据外部配置是否显示toast
|
||||
- (void)showToastWithContent:(NSString *)content;
|
||||
|
||||
- (void)setupSmallWindown;
|
||||
|
||||
- (void)changeToSmall;
|
||||
|
||||
- (void)changeToNormal;
|
||||
|
||||
/// 播放铃声
|
||||
- (void)playRingWithType:(CallRingType)ringType;
|
||||
|
||||
/// 停止播放量铃声
|
||||
- (void)stopCurrentPlaying;
|
||||
|
||||
// 设置声音设置输出到听筒
|
||||
- (void)setAudioOutputToReceiver;
|
||||
|
||||
// 设置声音输出到扬声器
|
||||
- (void)setAudioOutputToSpeaker;
|
||||
|
||||
// 获取非呼叫组件弹出的默认window
|
||||
- (UIWindow *)preiousWindow;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+39
@@ -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 <NERtcCallKit/NERtcCallKit.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "NECallUIKitConfig.h"
|
||||
#import "NECallViewBaseController.h"
|
||||
#import "NECustomButton.h"
|
||||
#import "NEUICallParam.h"
|
||||
#import "NEVideoView.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
extern NSString *const kCallKitDismissNoti;
|
||||
|
||||
@interface NECallViewController : NECallViewBaseController <NECallEngineDelegate>
|
||||
|
||||
@property(nonatomic, assign) NERtcCallStatus status;
|
||||
|
||||
@property(nonatomic, strong) NSMutableDictionary<NSString *, Class> *uiConfigDic;
|
||||
|
||||
@property(nonatomic, strong) NECallUIConfig *config;
|
||||
|
||||
/// 呼叫前音视频转换按钮
|
||||
@property(strong, nonatomic) NECustomButton *mediaSwitchBtn;
|
||||
|
||||
// 当前用户视频显示位置
|
||||
@property(nonatomic, assign) BOOL showMyBigView;
|
||||
|
||||
- (void)changeDefaultImage:(BOOL)mute;
|
||||
|
||||
- (void)changeRemoteMute:(BOOL)mute videoView:(NEVideoView *)remoteVideo;
|
||||
|
||||
- (void)destroy;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// 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 "NECallUIStateController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NECalledViewController : NECallUIStateController
|
||||
|
||||
@property(nonatomic, strong) UILabel *connectingLabel;
|
||||
|
||||
- (void)checkCallePreview;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,15 @@
|
||||
// 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 <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NECustomButton : UIView
|
||||
@property(strong, nonatomic) UIImageView *imageView;
|
||||
@property(strong, nonatomic) UILabel *titleLabel;
|
||||
@property(strong, nonatomic) UIButton *maskBtn;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,13 @@
|
||||
// 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 <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEExpandButton : UIButton
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,32 @@
|
||||
// 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 "NECallUIKitConfig.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NERingFile : NSObject
|
||||
|
||||
/// 主叫呼叫提示音
|
||||
@property(nonatomic, strong, nullable) NSString *callerRingFilePath;
|
||||
|
||||
/// 被叫收到邀请提示音
|
||||
@property(nonatomic, strong, nullable) NSString *calleeRingFilePath;
|
||||
|
||||
/// 拒绝提示音
|
||||
@property(nonatomic, strong, nullable) NSString *rejectRingFilePath;
|
||||
|
||||
/// 忙线提示音
|
||||
@property(nonatomic, strong, nullable) NSString *busyRingFilePath;
|
||||
|
||||
/// 无响应提示音
|
||||
@property(nonatomic, strong, nullable) NSString *noResponseFilePath;
|
||||
|
||||
/// 初始化
|
||||
- (instancetype)initWithBundle:(NSBundle *)bundle language:(NECallUILanguage)language;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
//// 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>
|
||||
|
||||
typedef NS_ENUM(NSInteger, CallRingType) {
|
||||
CRTCallerRing = 1, // 主叫呼叫铃声
|
||||
CRTCalleeRing = 2, // 被叫收到邀请铃声
|
||||
CRTRejectRing = 3, // 拒绝接听铃声
|
||||
CRTBusyRing = 4, // 拒绝接听铃声
|
||||
CRTNoResponseRing = 5, // 无响应铃声
|
||||
};
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NERingPlayerManager : NSObject
|
||||
|
||||
+ (id)shareInstance;
|
||||
|
||||
- (void)playRingWithRingType:(CallRingType)ringType isRtcPlay:(Boolean)isRtc;
|
||||
|
||||
- (void)stopCurrentPlaying;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
#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 "NEAudioCallingController.h"
|
||||
#import "NEAudioInCallController.h"
|
||||
#import "NECalledViewController.h"
|
||||
#import "NECallUIStateController.h"
|
||||
#import "NECallViewBaseController.h"
|
||||
#import "NECallViewController.h"
|
||||
#import "NEVideoCallingController.h"
|
||||
#import "NEVideoInCallController.h"
|
||||
#import "NERingPlayerManager.h"
|
||||
#import "NetManager.h"
|
||||
#import "NERingFile.h"
|
||||
#import "NEUICallParam.h"
|
||||
#import "NECallKitUtil.h"
|
||||
#import "NECallUIKitConfig.h"
|
||||
#import "NERtcCallUIKit.h"
|
||||
#import "NEBufferDisplayView.h"
|
||||
#import "NECustomButton.h"
|
||||
#import "NEExpandButton.h"
|
||||
#import "NEVideoOperationView.h"
|
||||
#import "NEVideoView.h"
|
||||
|
||||
FOUNDATION_EXPORT double NERtcCallUIKitVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char NERtcCallUIKitVersionString[];
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
// 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 NERtcCallUIKit_h
|
||||
#define NERtcCallUIKit_h
|
||||
|
||||
#import <AVKit/AVKit.h>
|
||||
#import "NECallUIKitConfig.h"
|
||||
#import "NECallViewController.h"
|
||||
#import "NECustomButton.h"
|
||||
#import "NEExpandButton.h"
|
||||
#import "NEUICallParam.h"
|
||||
#import "NEVideoOperationView.h"
|
||||
#import "NEVideoView.h"
|
||||
#import "NetManager.h"
|
||||
|
||||
#import "NEAudioCallingController.h"
|
||||
#import "NEAudioInCallController.h"
|
||||
#import "NECallViewBaseController.h"
|
||||
#import "NECalledViewController.h"
|
||||
#import "NERingFile.h"
|
||||
#import "NEVideoCallingController.h"
|
||||
#import "NEVideoInCallController.h"
|
||||
|
||||
// 音频呼叫中UI状态
|
||||
extern NSString *_Nonnull kAudioCalling;
|
||||
// 视频呼叫中UI状态
|
||||
extern NSString *_Nonnull kVideoCalling;
|
||||
// 音频通话中UI状态
|
||||
extern NSString *_Nonnull kAudioInCall;
|
||||
// 视频通话中UI状态
|
||||
extern NSString *_Nonnull kVideoInCall;
|
||||
// 被叫UI状态(音频&视频)
|
||||
extern NSString *_Nonnull kCalledState;
|
||||
|
||||
#endif /* NERtcCallUIKit_h */
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol NETranscodingDelegate <NSObject>
|
||||
|
||||
- (void)renderFrame:(NERtcVideoFrame *)frame withLayer:(AVSampleBufferDisplayLayer *)layer;
|
||||
|
||||
@end
|
||||
|
||||
@protocol NECallUIKitDelegate <NSObject>
|
||||
|
||||
/// 当有呼叫来到时候的回调,根据返回值决定内部是否返回,未实现此回调内部默认弹出被叫页面
|
||||
- (void)didCallComingWithInviteInfo:(NEInviteInfo *)inviteInfo
|
||||
withCallParam:(NEUICallParam *)callParam
|
||||
withCompletion:(void (^)(BOOL success))completion;
|
||||
|
||||
@end
|
||||
|
||||
@interface NERtcCallUIKit : NSObject
|
||||
|
||||
/// UI状态配置类,如果用户需要自定义某个状态的UI,需要继承通话状态类,通过对应key值覆盖对应Class
|
||||
@property(nonatomic, strong, readonly) NSMutableDictionary<NSString *, Class> *uiConfigDic;
|
||||
|
||||
/// 自定义UI,UI完全自己重写,呼叫组件只负责拉起此页面,此参数的优先级高于 uiConfigDic 配置,
|
||||
/// 传入的类型要继承自 NECallViewBaseController 类
|
||||
@property(nonatomic, strong, nullable) Class customControllerClass;
|
||||
|
||||
/// 铃声文件配置,默认初始化内部资源路径,如果需要替换再初始化之后修改对应路径,如果想禁止铃声播放,对应路径置空即可
|
||||
@property(nonatomic, strong) NERingFile *ringFile;
|
||||
|
||||
/// UI Kit 代理回调
|
||||
@property(nonatomic, weak) id<NECallUIKitDelegate> delegate;
|
||||
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/// 初始化,所有功能需要先初始化
|
||||
/// @param config 初始化参数
|
||||
- (void)setupWithConfig:(NECallUIKitConfig *)config;
|
||||
|
||||
/// 主叫发起呼叫接口
|
||||
/// @param callParam 呼叫参数
|
||||
- (void)callWithParam:(NEUICallParam *)callParam;
|
||||
|
||||
/// 设置自定义UI类
|
||||
- (void)setCustomCallClass:(NSMutableDictionary<NSString *, Class> *)customDic;
|
||||
|
||||
/// 转为小窗模式
|
||||
- (void)changeSmallModeWithTyple:(NECallType)callType;
|
||||
|
||||
/// 回复为非小窗模式
|
||||
- (void)restoreNormalMode;
|
||||
|
||||
/// 版本号
|
||||
+ (NSString *)version;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,82 @@
|
||||
// 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 <NERtcCallKit/NERtcCallKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEUICallParam : NSObject
|
||||
|
||||
#pragma mark - 必要参数
|
||||
|
||||
/// 被叫accid
|
||||
@property(nonatomic, strong) NSString *remoteUserAccid;
|
||||
|
||||
/// 通话页面被叫显示名称
|
||||
@property(nonatomic, strong) NSString *remoteShowName;
|
||||
|
||||
/// 被叫头像链接
|
||||
@property(nonatomic, strong) NSString *remoteAvatar;
|
||||
|
||||
/// 呼叫类型
|
||||
@property(assign, nonatomic) NECallType callType;
|
||||
|
||||
/// 是否是主叫 YES 表示主叫
|
||||
@property(nonatomic, assign) BOOL isCaller;
|
||||
|
||||
#pragma mark - 可选自定义参数
|
||||
|
||||
/// 推送自定义配置
|
||||
@property(nonatomic, strong, nullable) NECallPushConfig *pushConfig;
|
||||
|
||||
/// 全局抄送
|
||||
@property(nonatomic, strong) NSString *extra;
|
||||
|
||||
/// 自定义channel name
|
||||
@property(nonatomic, strong) NSString *channelName;
|
||||
|
||||
/// 呼叫扩展参数
|
||||
@property(nonatomic, strong) NSString *attachment;
|
||||
|
||||
/// 自定义参数扩展
|
||||
@property(nonatomic, strong) id customObject;
|
||||
|
||||
#pragma mark - UI配置参数
|
||||
|
||||
/// 本端关闭头像默认显示头像
|
||||
@property(nonatomic, strong) UIImage *muteDefaultImage;
|
||||
|
||||
/// 远端关闭视频默认显示头像
|
||||
@property(nonatomic, strong) UIImage *remoteDefaultImage;
|
||||
|
||||
/// 是否禁止音频通话转视频通话,默认YES,支持转换
|
||||
@property(nonatomic, assign) BOOL enableAudioToVideo;
|
||||
|
||||
/// 是否禁止音频通话转视频通话,默认YES,支持转换
|
||||
@property(nonatomic, assign) BOOL enableVideoToAudio;
|
||||
|
||||
/// 默认NO,关闭视频画面的时候使用 muteLocalVideo ,设置为YES时候,UI组件关闭视频时调用
|
||||
/// enableLocalVideo 设置NO来停止本端视频流
|
||||
@property(nonatomic, assign) BOOL useEnableLocalMute;
|
||||
|
||||
/// 是否开启内部话单弹框话单toast
|
||||
@property(nonatomic, assign) BOOL enableShowRecorderToast;
|
||||
|
||||
/// 是否开启虚化功能,默认NO, 不开启
|
||||
@property(nonatomic, assign) BOOL enableVirtualBackground;
|
||||
|
||||
/// 是否开启被叫预览,默认NO,不开启
|
||||
@property(nonatomic, assign) BOOL enableCalleePreview;
|
||||
|
||||
/// 是否开启小窗功能,默认不开启
|
||||
@property(nonatomic, assign) BOOL enableFloatingWindow;
|
||||
|
||||
/// 是否开启应用外小窗功能,默认不开启,开启后内部会使用 NECallEngine engineDelegate
|
||||
/// 属性监听Rtc回调,如果已经使用,存在影响,请在外部根据画中画方案实现应用外小窗
|
||||
@property(nonatomic, assign) BOOL enableFloatingWindowOutOfApp;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// 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 "NECallUIStateController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEVideoCallingController : NECallUIStateController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// 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 "NECallUIStateController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEVideoInCallController : NECallUIStateController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
// 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 <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEVideoOperationView : UIView
|
||||
/// 麦克风
|
||||
@property(strong, nonatomic) UIButton *microPhone;
|
||||
/// 开启/关闭视频
|
||||
@property(strong, nonatomic) UIButton *cameraBtn;
|
||||
/// 挂断
|
||||
@property(strong, nonatomic) UIButton *hangupBtn;
|
||||
/// 开启/关闭静音
|
||||
@property(strong, nonatomic) UIButton *speakerBtn;
|
||||
/// 通话中音视频通话类型切换
|
||||
@property(strong, nonatomic) UIButton *mediaBtn;
|
||||
/// 虚化按钮
|
||||
@property(strong, nonatomic) UIButton *virtualBtn;
|
||||
/// 是否支持虚化
|
||||
@property(assign, nonatomic) BOOL enableVirtualBackground;
|
||||
|
||||
- (void)changeAudioStyle;
|
||||
- (void)changeVideoStyle;
|
||||
- (void)hideMediaSwitch;
|
||||
|
||||
- (void)setGroupStyle;
|
||||
|
||||
- (void)removeMediaBtn;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,18 @@
|
||||
// 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 <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NEVideoView : UIView
|
||||
@property(strong, nonatomic) NSString *userID;
|
||||
@property(strong, nonatomic) UIView *videoView;
|
||||
@property(strong, nonatomic) UILabel *titleLabel;
|
||||
@property(strong, nonatomic) UIView *maskView;
|
||||
@property(strong, nonatomic) UIImageView *imageView;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,17 @@
|
||||
// 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 NetManager : NSObject
|
||||
|
||||
@property(nonatomic, assign) BOOL isClose;
|
||||
|
||||
+ (id)shareInstance;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Reference in New Issue
Block a user