Files
yinmeng-ios/xplan-ios/Main/RTC/RtcManager.h

96 lines
2.3 KiB
C
Raw Normal View History

//
// RTCManager.h
// xplan-ios
//
// Created by zu on 2021/10/19.
//
#import <Foundation/Foundation.h>
#import "RtcDelegate.h"
NS_ASSUME_NONNULL_BEGIN
typedef enum : NSUInteger {
RtcEngineType_Agora = 1001, // 声网
2021-12-06 20:43:58 +08:00
RtcEngineType_Zego, // 即构
RtcEngineType_WJ, // 无界
RtcEngineType_AgoraFast, // 声网急速
2021-12-06 20:43:58 +08:00
RtcEngineType_TRTC, // 腾讯TRTC
} RtcEngineType;
/** 音频服务管理单例,对所有音频服务 SDK 的封装。
**Note:**
2021-11-01 18:25:13 +08:00
- RtcManager
- RtcManager
- RctImpl
*/
2021-10-20 14:21:57 +08:00
@interface RtcManager : NSObject
2021-10-20 17:06:31 +08:00
/**
*
* YES🔇🙉
* NO🔊🐵
*/
@property(nonatomic,getter=isRemoteMuted) BOOL remoteMuted;
/**
*
* YES🤐🙊
* NO😲🐵
*/
@property(nonatomic,getter=isLocalMuted) BOOL localMuted;
2021-10-20 17:06:31 +08:00
/** 初始化/重新初始化 RtcManager 实例,设置音频服务类型和 RtcDelegate。
**Note:**
- delegate
- RtcManager [RtcManager instance] RtcManager
@param type 使 RtcEngineType
@param delegate RtcDelegate
@return - RtcManager instance
2021-10-19 19:29:25 +08:00
*/
2021-10-20 17:06:31 +08:00
+ (instancetype _Nonnull)initEngineWithType:(RtcEngineType)type
delegate:(id<RtcDelegate> _Nullable)delegate;
/** 获取 RtcManager instance。
**Note:**
- [RtcManager initEngineWithType:delegate:] RtcEngineType RtcDelegate使
@return - RtcManager instance
2021-10-19 19:29:25 +08:00
*/
2021-10-20 14:21:57 +08:00
+ (instancetype _Nonnull)instance;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (id)copy NS_UNAVAILABLE;
- (id)mutableCopy NS_UNAVAILABLE;
2021-11-01 18:25:13 +08:00
/**
*
*/
- (BOOL)enterRoom:(NSString *)roomUid;
2021-10-20 17:06:31 +08:00
2021-12-06 20:43:58 +08:00
/**
* TRTC
*/
- (BOOL)enterRoom:(NSString *)roomUid trtcSign:(NSString *)sign;
2021-11-01 18:25:13 +08:00
/**
*
*/
2021-10-20 17:06:31 +08:00
- (void)broadcast:(BOOL)on;
2021-11-01 18:25:13 +08:00
/**
* 退
*/
- (void)exitRoom;
2021-10-20 17:06:31 +08:00
@end
NS_ASSUME_NONNULL_END