提交
This commit is contained in:
75
QXLive/Room(房间)/Controller/QXRoomViewController+Singer.m
Normal file
75
QXLive/Room(房间)/Controller/QXRoomViewController+Singer.m
Normal file
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// QXRoomViewController+Singer.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/11/12.
|
||||
//
|
||||
|
||||
#import "QXRoomViewController+Singer.h"
|
||||
#import "QXAgoraEngine.h"
|
||||
@implementation QXRoomViewController (Singer)
|
||||
|
||||
|
||||
-(void)resetSingerViews{
|
||||
[self.seatContentView setType:QXRoomSeatViewTypeSinger];
|
||||
[self.seatContentView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.equalTo(self.view);
|
||||
make.top.mas_equalTo(self.titleView.bottom);
|
||||
make.height.mas_equalTo(ScaleWidth(164+50+50)+20+102);
|
||||
}];
|
||||
[self.chatListView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self.bottomView.mas_top);
|
||||
make.left.equalTo(self.view);
|
||||
make.top.equalTo(self.seatContentView.mas_bottom);
|
||||
// make.right.equalTo(self.soundBtn.mas_left).offset(-16);
|
||||
make.width.mas_equalTo(ScaleWidth(280));
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
-(void)configSingerData{
|
||||
if ([self.roomModel.singer_info.song_info.singer_user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
if (self.seatContentView.myPitNumber <= 0) {
|
||||
/// 我不在麦上 临时拉起权限
|
||||
self.bottomView.status = 2;
|
||||
[self.bottomView setMuteAudioStatus:NO];
|
||||
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:YES];
|
||||
[[QXAgoraEngine sharedEngine] muteLocalAudioStream:YES];
|
||||
}
|
||||
// else{
|
||||
// self.bottomView.status = 1;
|
||||
// [[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:NO];
|
||||
// [[QXAgoraEngine sharedEngine] muteLocalAudioStream:YES];
|
||||
// }
|
||||
}
|
||||
}
|
||||
/// 点唱房当前歌曲信息发生变化
|
||||
-(void)singerSongCurrentSongInfoDidChanged:(QXUserSongListModel*)model{
|
||||
if ([model.singer_user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
///如果是我自己
|
||||
if (self.seatContentView.myPitNumber <= 0) {
|
||||
self.bottomView.status = 2;
|
||||
if ([QXAgoraEngine sharedEngine].isOpenMic) {
|
||||
[self.bottomView setMuteAudioStatus:YES];
|
||||
}else{
|
||||
[self.bottomView setMuteAudioStatus:NO];
|
||||
}
|
||||
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:YES];
|
||||
}
|
||||
}else{
|
||||
if (self.seatContentView.myPitNumber <= 0) {
|
||||
self.bottomView.status = 1;
|
||||
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:NO];
|
||||
}
|
||||
}
|
||||
[self.seatContentView singerSongCurrentSongInfoDidChanged:model];
|
||||
}
|
||||
/// 点唱房下一首歌信息发生变化
|
||||
-(void)singerSongNextSongInfoDidChanged:(QXUserSongListModel*)model{
|
||||
[self.seatContentView singerSongNextSongInfoDidChanged:model];
|
||||
}
|
||||
/// 已点歌曲数量发生变化
|
||||
-(void)singerSongCountDidChanged:(NSString*)count{
|
||||
[self.seatContentView singerSongCountDidChanged:count];
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user