2021-10-20 14:21:57 +08:00
|
|
|
|
//
|
|
|
|
|
// RtcInterface.h
|
|
|
|
|
// xplan-ios
|
|
|
|
|
//
|
2021-11-18 15:33:30 +08:00
|
|
|
|
// Created by zu on 2021/10/20.
|
2021-10-20 14:21:57 +08:00
|
|
|
|
//
|
2021-10-20 17:06:31 +08:00
|
|
|
|
|
2021-10-20 14:21:57 +08:00
|
|
|
|
#import <Foundation/Foundation.h>
|
2022-05-09 22:18:42 +08:00
|
|
|
|
#import "RtcManager.h"
|
2021-10-20 14:21:57 +08:00
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
@protocol RtcInterface <NSObject>
|
2021-12-06 20:43:58 +08:00
|
|
|
|
@required
|
2021-10-20 14:21:57 +08:00
|
|
|
|
/**
|
|
|
|
|
加入频道(房间)
|
|
|
|
|
*/
|
2021-11-01 18:25:13 +08:00
|
|
|
|
- (BOOL)joinChannel:(NSString *)channelId completion:(void(^ __nullable)(void))completion;
|
|
|
|
|
/**
|
|
|
|
|
静音
|
|
|
|
|
*/
|
|
|
|
|
- (BOOL)muteRemote:(BOOL)mute;
|
2022-11-24 16:31:05 +08:00
|
|
|
|
/**
|
|
|
|
|
静音某个用户
|
|
|
|
|
userId: 用户ID
|
|
|
|
|
*/
|
|
|
|
|
- (BOOL)muteRemote:(BOOL)mute userId:(NSString *)userId;
|
2021-10-20 14:21:57 +08:00
|
|
|
|
/**
|
|
|
|
|
上下麦(说话)
|
|
|
|
|
*/
|
|
|
|
|
- (void)broadcast:(BOOL)on;
|
2022-04-15 18:23:01 +08:00
|
|
|
|
|
2021-11-01 18:25:13 +08:00
|
|
|
|
/**
|
|
|
|
|
闭麦
|
|
|
|
|
*/
|
|
|
|
|
- (BOOL)muteLocal:(BOOL)mute;
|
2021-10-20 14:21:57 +08:00
|
|
|
|
/**
|
|
|
|
|
退出频道
|
|
|
|
|
*/
|
2021-11-05 14:50:38 +08:00
|
|
|
|
- (void)exitChannel:(void(^ __nullable)(void))completion;
|
2021-10-20 14:21:57 +08:00
|
|
|
|
/**
|
|
|
|
|
销毁引擎
|
|
|
|
|
*/
|
|
|
|
|
- (void)destory;
|
2021-12-06 20:43:58 +08:00
|
|
|
|
|
|
|
|
|
@optional
|
|
|
|
|
/**
|
|
|
|
|
加入频道(房间),TRTC 进房需要动态签名。
|
|
|
|
|
*/
|
|
|
|
|
- (BOOL)joinChannel:(NSString *)channelId sign:(NSString *)sign completion:(void(^ __nullable)(void))completion;
|
2022-04-13 20:24:26 +08:00
|
|
|
|
|
|
|
|
|
///发起跨房通话
|
|
|
|
|
- (void)connectOtherRoom:(NSString *)roomUId userId:(NSString *)userId;
|
|
|
|
|
|
|
|
|
|
///退出跨房通话
|
|
|
|
|
- (void)disconnectOtherRoom;
|
|
|
|
|
|
2022-05-09 22:18:42 +08:00
|
|
|
|
|
|
|
|
|
/// @param filePath 音频文件的地址
|
|
|
|
|
/// @param musicId TRTC自己要的
|
2022-05-10 19:04:56 +08:00
|
|
|
|
- (BOOL)playBackMusic:(NSString *)filePath musicId:(int)musicId completion:(void (^)(NSString *))completion;
|
2022-05-09 22:18:42 +08:00
|
|
|
|
|
|
|
|
|
/// 改变播放器的状态
|
|
|
|
|
/// @param state 播放状态
|
|
|
|
|
- (BOOL)changePlayState:(BackMusicPlayState)state;
|
|
|
|
|
|
|
|
|
|
///背景音乐的音量大小
|
|
|
|
|
- (void)updateMusicSound:(int)soundVol;
|
|
|
|
|
|
|
|
|
|
///背景人声的音量大小
|
|
|
|
|
- (void)updateUserSound:(int)soundVol;
|
2021-10-20 14:21:57 +08:00
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|