|
|
|
@ -157,7 +157,7 @@ class RoomController extends GetxController { |
|
|
|
|
|
|
|
Future<void> joinChat(CurrentRole role) async { |
|
|
|
final data = { |
|
|
|
'channelId': rtcChannel.value?.channelId, |
|
|
|
'channelId': RTCManager.instance.currentChannelId, |
|
|
|
'seatNumber': role == CurrentRole.maleAudience ? 1 : 2, |
|
|
|
'isMicrophoneOn': role != CurrentRole.normalUser ? true : false, |
|
|
|
'isVideoOn': |
|
|
|
@ -181,7 +181,7 @@ class RoomController extends GetxController { |
|
|
|
} |
|
|
|
|
|
|
|
Future<void> leaveChat() async { |
|
|
|
final data = {'channelId': rtcChannel.value?.channelId}; |
|
|
|
final data = {'channelId': RTCManager.instance.currentChannelId}; |
|
|
|
final response = await _networkService.rtcApi.disconnectRtcChannel(data); |
|
|
|
if (response.data.isSuccess) { |
|
|
|
isLive = false; |
|
|
|
@ -222,8 +222,7 @@ class RoomController extends GetxController { |
|
|
|
|
|
|
|
/// 发送公屏消息 |
|
|
|
Future<void> sendChatMessage(String content) async { |
|
|
|
final channelName = |
|
|
|
rtcChannel.value?.channelId ?? RTCManager.instance.currentChannelId; |
|
|
|
final channelName = RTCManager.instance.currentChannelId; |
|
|
|
|
|
|
|
final result = await _messageService.sendMessage( |
|
|
|
content: content, |
|
|
|
|