全员观看切换优化

This commit is contained in:
fuenmao 2024-12-25 11:14:06 +08:00
parent 7052764dc8
commit d488f29ddf
2 changed files with 74 additions and 66 deletions

View File

@ -196,6 +196,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
if (res.data!.toString().length != 9) {
//
if (state.remoteUid.value == UserStore.to.userInfoEntity.value!.uid) {
debugPrint("wgs输出===:当前全员观看是自己");
//
// ID为0
state.remoteUid.value = "0";
@ -210,6 +211,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
changePageState(0);
}
} else {
debugPrint("wgs输出===:当前全员观看不是自己");
//
//
var isCurrentUserIsCamera = false;
@ -223,13 +225,17 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
if (isCurrentUserIsCamera == true) {
//
debugPrint("wgs输出===:当前会议室存在全员观看主播时,切换页面到视频状态");
changePageState(0);
Future.delayed(const Duration(milliseconds: 200), () {
changePageState(1);
});
} else {
// ID为空并切换页面到视频状态
debugPrint("wgs输出===当前会议室不存在全员观看主播时设置主播ID为空并切换页面到视频状态");
state.remoteUid.value = "";
changePageState(1);
}
update();
}
} else {
if(state.remoteUid.value == UserStore.to.userInfoEntity.value!.screenShareId){

View File

@ -1519,7 +1519,8 @@ class MeetingMainPageState extends State<MeetingMainPage> {
var pageList = [];
///
pageList.add(Stack(
pageList.add(GetBuilder<MeetingMainLogic>(builder: (controll) {
return Stack(
alignment: Alignment.center,
children: [
state.remoteUid.value != ""
@ -1591,7 +1592,8 @@ class MeetingMainPageState extends State<MeetingMainPage> {
),
),
],
));
);
}));
/// gridview
pageList.add(Container(