12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- //
- // TXRTCService.h
- // StudentDaya
- //
- // Created by 王智 on 2023/4/18.
- // Copyright © 2023 DayaMusic. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- #import "TXLiteAVSDK_Professional/TXLiteAVSDK.h"
- #import "TxRTCRoomConfig.h"
- #define TRTC_MANAGER ([TXRTCService shareInstance])
- typedef void(^KSRTCCallback)(NSInteger code);
- @protocol TXRTCServiceDelegate <NSObject>
- - (void)didReportNetworkQuality:(TRTCQuality)quality remoteQuality:(NSArray<TRTCQualityInfo *> *_Nullable)remoteQuality;
- - (void)didReportUserVolume:(NSArray<TRTCVolumeInfo *> *_Nullable)userVolumes;
- @end
- NS_ASSUME_NONNULL_BEGIN
- @interface TXRTCService : NSObject
- @property (nonatomic, assign) NSInteger ANS;
- @property (nonatomic, assign) NSInteger AEC;
- @property (nonatomic, assign) NSInteger AGC;
- @property (nonatomic, weak) id <TXRTCServiceDelegate> delegate;
- + (instancetype)shareInstance;
- // 刷新publish重力感应模式
- - (void)refreshGSMode;
- - (void)setting3AParmWithANS:(NSInteger)ANS AEC:(NSInteger)AEC AGC:(NSInteger)AGC;
- - (void)config3AWithANS:(NSInteger)ANS AEC:(NSInteger)AEC AGC:(NSInteger)AGC;
- - (void)configWithRoomConfig:(TxRTCRoomConfig *)roomConfig successCallback:(void(^)(void))callback;
- - (void)joinRTCRoom:(NSString *)roomId success:(KSRTCCallback)success failer:(KSRTCCallback)error;
- - (void)leaveRoom:(KSRTCCallback)callback;
- - (void)publishStream;
- - (void)renderLocalUserInView:(UIView *)displayView isCameraEnable:(BOOL)cameraEnable;
- - (void)renderRemoteUser:(NSString *)userId inView:(UIView *)displayView;
- - (void)cancleRenderUserVideo:(NSString *)userId;
- #pragma mark ---- 不播放音频流
- - (void)unPlayRemoteStudentAudioStream;
- - (void)playAllRemoteStudentAudioStream;
- - (void)unPlayRemoteStudentWithId:(NSString *)studentId;
- #pragma mark - 顶部工具栏接口
- /**
- 关闭/打开麦克风
-
- @param disable YES 关闭,NO 打开
- */
- - (void)setMicrophoneDisable:(BOOL)disable;
- /**
- 采集运行中关闭或打开摄像头
-
- @param disable YES 关闭,否则打开
- */
- - (void)setCameraDisable:(BOOL)disable;
- /**
- 切换前后摄像头
- */
- - (void)switchCamera;
- /**
- 切换使用外放/听筒
- */
- - (void)useSpeaker:(BOOL)useSpeaker;
- - (UIImage *)generalCloseImage;
- @end
- NS_ASSUME_NONNULL_END
|