全员观看切换优化
This commit is contained in:
parent
7052764dc8
commit
d488f29ddf
|
|
@ -196,6 +196,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
if (res.data!.toString().length != 9) {
|
if (res.data!.toString().length != 9) {
|
||||||
// 摄像头
|
// 摄像头
|
||||||
if (state.remoteUid.value == UserStore.to.userInfoEntity.value!.uid) {
|
if (state.remoteUid.value == UserStore.to.userInfoEntity.value!.uid) {
|
||||||
|
debugPrint("wgs输出===:当前全员观看是自己");
|
||||||
// 全员观看主播是自己
|
// 全员观看主播是自己
|
||||||
// 设置主播ID为0(自己)
|
// 设置主播ID为0(自己)
|
||||||
state.remoteUid.value = "0";
|
state.remoteUid.value = "0";
|
||||||
|
|
@ -210,6 +211,7 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
changePageState(0);
|
changePageState(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
debugPrint("wgs输出===:当前全员观看不是自己");
|
||||||
// 全员观看主播不是自己
|
// 全员观看主播不是自己
|
||||||
// 判断当前会议室是否存在全员观看主播
|
// 判断当前会议室是否存在全员观看主播
|
||||||
var isCurrentUserIsCamera = false;
|
var isCurrentUserIsCamera = false;
|
||||||
|
|
@ -223,13 +225,17 @@ class MeetingMainLogic extends GetxController with RequestToolMixin {
|
||||||
if (isCurrentUserIsCamera == true) {
|
if (isCurrentUserIsCamera == true) {
|
||||||
// 当前会议室存在全员观看主播时,切换页面到视频状态
|
// 当前会议室存在全员观看主播时,切换页面到视频状态
|
||||||
debugPrint("wgs输出===:当前会议室存在全员观看主播时,切换页面到视频状态");
|
debugPrint("wgs输出===:当前会议室存在全员观看主播时,切换页面到视频状态");
|
||||||
changePageState(1);
|
changePageState(0);
|
||||||
|
Future.delayed(const Duration(milliseconds: 200), () {
|
||||||
|
changePageState(1);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
// 当前会议室不存在全员观看主播时,设置主播ID为空并切换页面到视频状态
|
// 当前会议室不存在全员观看主播时,设置主播ID为空并切换页面到视频状态
|
||||||
debugPrint("wgs输出===:当前会议室不存在全员观看主播时,设置主播ID为空并切换页面到视频状态");
|
debugPrint("wgs输出===:当前会议室不存在全员观看主播时,设置主播ID为空并切换页面到视频状态");
|
||||||
state.remoteUid.value = "";
|
state.remoteUid.value = "";
|
||||||
changePageState(1);
|
changePageState(1);
|
||||||
}
|
}
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(state.remoteUid.value == UserStore.to.userInfoEntity.value!.screenShareId){
|
if(state.remoteUid.value == UserStore.to.userInfoEntity.value!.screenShareId){
|
||||||
|
|
|
||||||
|
|
@ -1519,79 +1519,81 @@ class MeetingMainPageState extends State<MeetingMainPage> {
|
||||||
var pageList = [];
|
var pageList = [];
|
||||||
|
|
||||||
/// 大屏
|
/// 大屏
|
||||||
pageList.add(Stack(
|
pageList.add(GetBuilder<MeetingMainLogic>(builder: (controll) {
|
||||||
alignment: Alignment.center,
|
return Stack(
|
||||||
children: [
|
alignment: Alignment.center,
|
||||||
state.remoteUid.value != ""
|
children: [
|
||||||
? AgoraVideoView(
|
state.remoteUid.value != ""
|
||||||
controller: VideoViewController(
|
? AgoraVideoView(
|
||||||
rtcEngine: state.rctEngine.value!,
|
controller: VideoViewController(
|
||||||
canvas: VideoCanvas(
|
rtcEngine: state.rctEngine.value!,
|
||||||
uid: int.tryParse(state.remoteUid.value),
|
canvas: VideoCanvas(
|
||||||
setupMode: VideoViewSetupMode.videoViewSetupAdd,
|
uid: int.tryParse(state.remoteUid.value),
|
||||||
renderMode: state.remoteUid.value.length == 9
|
setupMode: VideoViewSetupMode.videoViewSetupAdd,
|
||||||
? RenderModeType.renderModeFit
|
renderMode: state.remoteUid.value.length == 9
|
||||||
: RenderModeType.renderModeHidden),
|
? RenderModeType.renderModeFit
|
||||||
),
|
: RenderModeType.renderModeHidden),
|
||||||
)
|
),
|
||||||
: Container(
|
)
|
||||||
width: double.infinity,
|
: Container(
|
||||||
color: ColorUtil.Color_57_57_57,
|
width: double.infinity,
|
||||||
child: Column(
|
color: ColorUtil.Color_57_57_57,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
child: Column(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
Image.asset(
|
|
||||||
'assets/images/metting_main_no_person.png',
|
|
||||||
width: 138.w,
|
|
||||||
height: 144.h,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 20),
|
|
||||||
Text(
|
|
||||||
'主持人正在赶来的路上...',
|
|
||||||
style: TextStyle(
|
|
||||||
color: ColorUtil.Color_255_255_255, fontSize: 14.sp),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 16,
|
|
||||||
right: 16,
|
|
||||||
child: Container(
|
|
||||||
height: 30,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
color: ColorUtil.Color_0_0_0_96),
|
|
||||||
padding: const EdgeInsets.only(left: 12, right: 12),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Image.asset(
|
||||||
'正在讲话:',
|
'assets/images/metting_main_no_person.png',
|
||||||
style: TextStyle(
|
width: 138.w,
|
||||||
fontSize: 10.sp, color: ColorUtil.Color_185_184_184),
|
height: 144.h,
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 20.w,
|
|
||||||
height: 20.h,
|
|
||||||
child: LiquidCustomProgressIndicator(
|
|
||||||
value: state.spokesmanVolume.value,
|
|
||||||
valueColor: const AlwaysStoppedAnimation(
|
|
||||||
ColorUtil.Color_2_177_136),
|
|
||||||
backgroundColor: ColorUtil.Color_255_255_255,
|
|
||||||
direction: Axis.vertical,
|
|
||||||
shapePath: ViewSvgPath.getMicrpphonePath()),
|
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
Text(
|
Text(
|
||||||
state.spokesman.value,
|
'主持人正在赶来的路上...',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 10.sp, color: ColorUtil.Color_185_184_184),
|
color: ColorUtil.Color_255_255_255, fontSize: 14.sp),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Positioned(
|
||||||
],
|
top: 16,
|
||||||
));
|
right: 16,
|
||||||
|
child: Container(
|
||||||
|
height: 30,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
color: ColorUtil.Color_0_0_0_96),
|
||||||
|
padding: const EdgeInsets.only(left: 12, right: 12),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'正在讲话:',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 10.sp, color: ColorUtil.Color_185_184_184),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 20.w,
|
||||||
|
height: 20.h,
|
||||||
|
child: LiquidCustomProgressIndicator(
|
||||||
|
value: state.spokesmanVolume.value,
|
||||||
|
valueColor: const AlwaysStoppedAnimation(
|
||||||
|
ColorUtil.Color_2_177_136),
|
||||||
|
backgroundColor: ColorUtil.Color_255_255_255,
|
||||||
|
direction: Axis.vertical,
|
||||||
|
shapePath: ViewSvgPath.getMicrpphonePath()),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
state.spokesman.value,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 10.sp, color: ColorUtil.Color_185_184_184),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}));
|
||||||
|
|
||||||
/// gridview
|
/// gridview
|
||||||
pageList.add(Container(
|
pageList.add(Container(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue