Browse Source

fix(discover): 解决加入他人直播间时状态初始化问题

- 加入他人直播间时将当前用户默认设置为普通观众角色
- 添加直播状态重置逻辑,确保正确初始化直播状态
master
Jolie 3 months ago
parent
commit
fcbb6a55b0
1 changed files with 2 additions and 0 deletions
  1. 2
      lib/controller/discover/room_controller.dart

2
lib/controller/discover/room_controller.dart

@ -163,7 +163,9 @@ class RoomController extends GetxController with WidgetsBindingObserver {
final base = response.data;
if (base.isSuccess && base.data != null) {
rtcChannel.value = base.data;
//
currentRole = CurrentRole.normalUser;
isLive.value = false;
await _joinRtcChannel(
base.data!.token,
channelName,

Loading…
Cancel
Save