Files
peko-ios/YuMi/Modules/YMRTC/RtcImpl/RtcInterface.h
2024-10-12 19:30:41 +08:00

77 lines
1.5 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// RtcInterface.h
// YUMI
//
// Created by zu on 2021/10/20.
//
#import <Foundation/Foundation.h>
#import "RtcManager.h"
NS_ASSUME_NONNULL_BEGIN
@protocol RtcInterface <NSObject>
@required
/**
加入频道(房间)
*/
- (BOOL)joinChannel:(NSString *)channelId completion:(void(^ __nullable)(void))completion;
/**
静音
*/
- (BOOL)muteRemote:(BOOL)mute;
/**
静音某个用户
userId: 用户ID
*/
- (BOOL)muteRemote:(BOOL)mute userId:(NSString *)userId;
/**
上下麦(说话)
*/
- (void)broadcast:(BOOL)on;
/**
闭麦
*/
- (BOOL)muteLocal:(BOOL)mute;
/**
退出频道
*/
- (void)exitChannel:(void(^ __nullable)(void))completion;
/**
销毁引擎
*/
- (void)destory;
@optional
/**
加入频道房间TRTC 进房需要动态签名。
*/
- (BOOL)joinChannel:(NSString *)channelId sign:(NSString *)sign completion:(void(^ __nullable)(void))completion;
///发起跨房通话
- (void)connectOtherRoom:(NSString *)roomUId userId:(NSString *)userId;
///退出跨房通话
- (void)disconnectOtherRoom;
/// @param filePath 音频文件的地址
/// @param musicId TRTC自己要的
- (BOOL)playBackMusic:(NSString *)filePath musicId:(int)musicId completion:(void (^)(NSString *))completion;
/// 改变播放器的状态
/// @param state 播放状态
- (BOOL)changePlayState:(BackMusicPlayState)state;
///背景音乐的音量大小
- (void)updateMusicSound:(int)soundVol;
///背景人声的音量大小
- (void)updateUserSound:(int)soundVol;
///获取人声音量大小
- (NSInteger)loadUserSound;
@end
NS_ASSUME_NONNULL_END