From 8e9e4b28123f4955c0d07521834a672ea1b2f030 Mon Sep 17 00:00:00 2001 From: fuenmao <980740792@qq.com> Date: Tue, 24 Dec 2024 16:30:30 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=90=8D=E5=AD=97=E8=B6=8A=E7=95=8C=E9=97=AE?= =?UTF-8?q?=E9=A2=98=202.=E6=88=90=E5=91=98=E6=90=9C=E7=B4=A2=E6=A1=86?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E9=97=AE=E9=A2=98=203.=E6=88=90=E5=91=98?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A1=86=E5=85=B1=E4=BA=AB=E6=A0=87=E8=AF=86?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2.0x/meeting_main_share_currently_n.png | Bin 0 -> 929 bytes .../3.0x/meeting_main_share_currently_n.png | Bin 0 -> 1498 bytes .../images/meeting_main_share_currently_n.png | Bin 0 -> 460 bytes .../lib/common/models/meeting_room_user.dart | 5 +- .../lib/pages/metting/meeting_main_logic.dart | 27 +++- .../lib/pages/metting/meeting_main_view.dart | 135 ++++++++++-------- .../voice/meeting_main_voice_view.dart | 30 ++-- 7 files changed, 123 insertions(+), 74 deletions(-) create mode 100644 wgshare/assets/images/2.0x/meeting_main_share_currently_n.png create mode 100644 wgshare/assets/images/3.0x/meeting_main_share_currently_n.png create mode 100644 wgshare/assets/images/meeting_main_share_currently_n.png diff --git a/wgshare/assets/images/2.0x/meeting_main_share_currently_n.png b/wgshare/assets/images/2.0x/meeting_main_share_currently_n.png new file mode 100644 index 0000000000000000000000000000000000000000..6d6d57391fd897191e355c6afa3de400d30c25fe GIT binary patch literal 929 zcmV;S177@zP)e$VZ{CE60!iMnHf7c zD8#i>N(mmOP-&DU#PEdbsH$NY4)kjX&7{yw15Z=F?-#}$rxY@h$HNjT1A2I(|AF+lLv3g>uDI zOEF}P?!<(R^F;2AjKI^)P54J-Ww~W0HQ>`&&vtjMyF)|p@r1y&fd_A#|qa5xzMVilAW&_eV!xb*?r`XvzWwp-4rSgfwUvdI-sQsOcx=@-ja5YdlZkXg05Z zY8H6^+oW_1$@p83C}pNS?(`s4}^CH*R58xxj}o` zpb1l%UQGo_9@!bNd+C0$NKG|pm#}<_Bzga4LZ;aCRl7CCawy2BcXM;gI%8?oGFCEB z>`V0pbiPWp!0qp0urt7jt!V8Gpa(?gnLz@b0vRrnH6bVX+7d`h4<8a)zRi8=!2hBax0409_2OD&W7(5u000000NkvXXu0mjf DZmFtW literal 0 HcmV?d00001 diff --git a/wgshare/assets/images/3.0x/meeting_main_share_currently_n.png b/wgshare/assets/images/3.0x/meeting_main_share_currently_n.png new file mode 100644 index 0000000000000000000000000000000000000000..239c409b0cbd8c3a31cd022e32be0b74d22e73db GIT binary patch literal 1498 zcmV<01tt24P)K?FT))`Leo)r)wr^-vF9ntIoE zy@}GqgQrCjVJ{0S9hVgxQ88W0rN_N6ej^iA*tU_*cbDk7wG#U;cvfQS`G0n{u!ydP~I6miAOQlj3>NAPL zUQSOJEutmSU1o7V#GT7xAYhJLfto^e@VHgDEwV_D`hcY|SbXU?#m;kBkj<^kAFJHH zCw)=CrshN0;@?`uZ&Hs)r(!jqFHtI05ZyW*9OQGAN(~+U0}Fg`X)w5Ky+ty_lAh6M zz)GIzrCH?qPPv?AQLvCpgTv)}Y?)e5DvYh;TZx)4Jli;B|MB=SL}h94*xbq{;^Y=1 zU!2F{La(^@>J@E2ct9Tsn_E>lCuNj`fo!>48#{Nd9`v`@*66PnFX$ryhqSI^Ib~r? z`KyZ;(<4(;;TON%zD*zAy(2?B(!=Jqu6nYPFyZ}de9qjsK}W{N{qOhp_UPBESN)>_ zGu&!=mk^wmt8$`Lm@vN^^bd`UQ0C@M{|G*8Z`0d*_s9TDYd9rcaSJL_QpI9!=NDg` zI6)H^E`lTa}%VC`>$=LbtJFXU@>E+1aoUtHE39Vkpj$c}bbY z+@!(dSFZTh3ovyihT`TDe=}(iD?hcO@~+?=g98Z!LFhO4?{_;DfBp@%{(Mmgirx=y z9dW11npNlPkCHAhbwiQeTCGu?o(|jZD=Wd!4!oF1V^r^(M!2SU>)78-nu-o7g0=1V z<;!6oj>Nll>qq{W;iu~AT$$K}ID>rU1(i?d0AUPbx0OBmZBIUb8D#f~meDe6t!K$0+( zz%RDeh{cnW)46X~SL;D00B5qZxrwsERyT15ma4}MBngwPAztUgE24%4QRqQvwDj5J zWH!2ZBkS%~Rxq4?mAC=R^X{^z#W+Aq8sbhV?!X3>7P*#X8-aWiimAC;}5RCUM zZmmGL{=`Hig#nauL)7G45pkz3QS(R7M2y5 z^r6wwGM5!fWJV=vP$q0S=KJTuQV?a6B1a}B{IWv8{_d{bLm4lzN}MPxA*AuBDM~vI zM84LU2^f?WO0vxhY3*KE23{^IqE2R;4 zFZj-c3$OuL3KD9R9yN=sN+=5x=Fd}~#dRwypibF=hkNVnc4|fUgA&(SR)E$1e*HS= zdZZ}|Xs0a^aTV$#uv&Ca0M6u}dL5hZ+M<9_K871{gE-@@)J~8Az;Q(P1b&{KZJ2Jh z_mpUgascABHR=O!CgbPNZ$xh3aB{jp2K1ak3+v5MQy^kXkMu#p2ShNt)X`I z_h;Bz2<7Ypp6XUYw*1M#Q!vY=yCMx4GUR{9zvCN@Tfh@f6#xJL07*qoM6N<$f=$H7 A-~a#s literal 0 HcmV?d00001 diff --git a/wgshare/assets/images/meeting_main_share_currently_n.png b/wgshare/assets/images/meeting_main_share_currently_n.png new file mode 100644 index 0000000000000000000000000000000000000000..b7a8aeae76d3e0a3fc488dd5520909ec1c139777 GIT binary patch literal 460 zcmV;-0W+3B>%sDWqQ!0v3TYMz~XiQvzZ@ z7-w`(*L4#F5q$8t-Mu$&XJ!ZB-$J-L zan@?7L03|vn>9^FYGd)TR>SK~=TyH{GZQAGFSs9#JW(h_^pdVYJIu;68Krv4qEvFp zEG08X(KXZy*OeB@y-N&ld%cv)Br{t#QA< srcJson) => _$MeetingRoomUserFromJson(srcJson); diff --git a/wgshare/lib/pages/metting/meeting_main_logic.dart b/wgshare/lib/pages/metting/meeting_main_logic.dart index 4fff037..60ce81e 100644 --- a/wgshare/lib/pages/metting/meeting_main_logic.dart +++ b/wgshare/lib/pages/metting/meeting_main_logic.dart @@ -232,13 +232,30 @@ class MeetingMainLogic extends GetxController with RequestToolMixin { } } } else { - // 共享屏幕(此版本不做) - /*if(state.remoteUid.value == UserStore.to.userInfoEntity.value!.screenShareId){ + if(state.remoteUid.value == UserStore.to.userInfoEntity.value!.screenShareId){ // 如果是自己在共享 }else{ - // 如果是别人在共享,切换页面到视频状态 - changePageState(1); - }*/ + // 共享不是自己 + // 判断当前会议室是否存在共享成员 + var isCurrentUserIsCamera = false; + for (var i = 0; i < state.cacheUsers.value.length; i++) { + if (state.remoteUid.value == state.cacheUsers.value[i].screenShareId) { + state.cacheUsers.value[i].enableShare = true; + isCurrentUserIsCamera = true; + } + } + + if (isCurrentUserIsCamera == true) { + // 当前会议室存在全员观看主播时,切换页面到视频状态 + debugPrint("wgs输出===:当前会议室存在全员观看主播时,切换页面到视频状态"); + changePageState(1); + } else { + // 当前会议室不存在全员观看主播时,设置主播ID为空并切换页面到视频状态 + debugPrint("wgs输出===:当前会议室不存在全员观看主播时,设置主播ID为空并切换页面到视频状态"); + state.remoteUid.value = ""; + changePageState(1); + } + } } } diff --git a/wgshare/lib/pages/metting/meeting_main_view.dart b/wgshare/lib/pages/metting/meeting_main_view.dart index 305c494..d096a02 100644 --- a/wgshare/lib/pages/metting/meeting_main_view.dart +++ b/wgshare/lib/pages/metting/meeting_main_view.dart @@ -279,8 +279,8 @@ class MeetingMainPageState extends State { child: Container( width: 200.w, height: 40.h, - margin: - const EdgeInsets.only(left: 20, bottom: 40), + margin: const EdgeInsets.only( + left: 20, bottom: 40), padding: const EdgeInsets.only(left: 20), decoration: BoxDecoration( borderRadius: const BorderRadius.only( @@ -293,7 +293,8 @@ class MeetingMainPageState extends State { color: ColorUtil.Color_99_111_158), ), child: Row( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.start, children: [ Image.asset( @@ -315,26 +316,28 @@ class MeetingMainPageState extends State { Get.bottomSheet( isScrollControlled: true, chatBottomSheet(context)); - Future.delayed(const Duration(milliseconds: 100), - () { - state.chatController.jumpTo(state - .chatController.position.maxScrollExtent); - }); + Future.delayed( + const Duration(milliseconds: 100), () { + state.chatController.jumpTo(state + .chatController + .position + .maxScrollExtent); + }); }, ), - Visibility( visible: state.isSpeak.value, child: GestureDetector( child: Container( width: 82.w, height: 40.h, - margin: const EdgeInsets.only(left: 12, bottom: 40,right: 20), + margin: const EdgeInsets.only( + left: 12, bottom: 40, right: 20), alignment: Alignment.center, decoration: const BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(99)), - color: ColorUtil.Color_255_69_69 - ), + borderRadius: BorderRadius.all( + Radius.circular(99)), + color: ColorUtil.Color_255_69_69), child: Text( '结束发言', style: TextStyle( @@ -417,7 +420,8 @@ class MeetingMainPageState extends State { if (state.isSpeak.value == false) { Get.bottomSheet( isScrollControlled: true, - applySpeakPermissionBottomSheet(context,1)); + applySpeakPermissionBottomSheet( + context, 1)); } else { if (state.isOpenMicrophone.value == false) { logic.doHttpSetMicr(true); @@ -446,7 +450,8 @@ class MeetingMainPageState extends State { Text( /*state.isSpeak.value == false ? '申请发言' - : */state.isOpenCamera.value == true + : */ + state.isOpenCamera.value == true ? "关闭视频" : "开启视频", style: TextStyle( @@ -459,7 +464,8 @@ class MeetingMainPageState extends State { if (state.isSpeak.value == false) { Get.bottomSheet( isScrollControlled: true, - applySpeakPermissionBottomSheet(context,2)); + applySpeakPermissionBottomSheet( + context, 2)); } else { if (state.isOpenCamera.value == true) { logic.doHttpSetCamer(false); @@ -763,14 +769,13 @@ class MeetingMainPageState extends State { ), Expanded( child: GestureDetector( - child: Container( - color: ColorUtil.Color_57_57_57_08, - ), - onTap: (){ - logic.changeMeetingInfoState(false); - }, - ) - ) + child: Container( + color: ColorUtil.Color_57_57_57_08, + ), + onTap: () { + logic.changeMeetingInfoState(false); + }, + )) ], ), ); @@ -784,13 +789,13 @@ class MeetingMainPageState extends State { children: [ Expanded( child: GestureDetector( - child: Container( - color: ColorUtil.Color_57_57_57_08, - ), - onTap: (){ - logic.changeMeetingAudioState(false); - }, - )), + child: Container( + color: ColorUtil.Color_57_57_57_08, + ), + onTap: () { + logic.changeMeetingAudioState(false); + }, + )), Container( color: ColorUtil.Color_57_57_57_08, child: Container( @@ -809,13 +814,13 @@ class MeetingMainPageState extends State { ), Expanded( child: GestureDetector( - child:Container( - color: ColorUtil.Color_57_57_57_08, - ), - onTap: (){ - logic.changeMeetingAudioState(false); - }, - )) + child: Container( + color: ColorUtil.Color_57_57_57_08, + ), + onTap: () { + logic.changeMeetingAudioState(false); + }, + )) ], ), ); @@ -874,7 +879,8 @@ class MeetingMainPageState extends State { } /// 申请发言权限底部弹窗 - Widget applySpeakPermissionBottomSheet(BuildContext context, int defaulOpenState) { + Widget applySpeakPermissionBottomSheet( + BuildContext context, int defaulOpenState) { return Container( height: 240.h, color: ColorUtil.Color_7_9_11, @@ -1070,13 +1076,15 @@ class MeetingMainPageState extends State { Container( margin: const EdgeInsets.only(top: 18, left: 16, right: 16, bottom: 16), - child: Text( - '会议中(${state.users.value.length})', - style: TextStyle( - fontSize: 14.sp, - fontWeight: FontWeight.w500, - color: ColorUtil.Color_85_117_242), - ), + child: GetBuilder(builder: (controll) { + return Text( + '会议中(${state.users.value.length})', + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.w500, + color: ColorUtil.Color_85_117_242), + ); + }), ), Expanded( child: ScrollConfiguration( @@ -1175,7 +1183,10 @@ class MeetingMainPageState extends State { children: [ Container( child: Image.asset( - 'assets/images/meeting_main_share_currently.png', + state.users.value[index].enableShare == + true + ? 'assets/images/meeting_main_share_currently.png' + : 'assets/images/meeting_main_share_currently_n.png', width: 17.w, height: 17.h, ), @@ -1517,7 +1528,9 @@ class MeetingMainPageState extends State { canvas: VideoCanvas( uid: int.tryParse(state.remoteUid.value), setupMode: VideoViewSetupMode.videoViewSetupAdd, - renderMode: state.remoteUid.value.length == 9 ? RenderModeType.renderModeFit : RenderModeType.renderModeHidden), + renderMode: state.remoteUid.value.length == 9 + ? RenderModeType.renderModeFit + : RenderModeType.renderModeHidden), ), ) : Container( @@ -1677,11 +1690,14 @@ class MeetingMainPageState extends State { shapePath: ViewSvgPath.getMicrpphonePath()), ), - Text( - state.cacheUsers.value[index].userName, - style: TextStyle( - fontSize: 12.sp, - color: ColorUtil.Color_255_255_255), + SizedBox( + width: 70, + child: Text( + state.cacheUsers.value[index].userName, + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_255_255_255), + ) ) ], ) @@ -1694,11 +1710,14 @@ class MeetingMainPageState extends State { width: 20.w, height: 20.h, ), - Text( - state.cacheUsers.value[index].userName, - style: TextStyle( - fontSize: 12.sp, - color: ColorUtil.Color_255_255_255), + SizedBox( + width: 70, + child: Text( + state.cacheUsers.value[index].userName, + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_255_255_255), + ) ) ], ), diff --git a/wgshare/lib/pages/metting/voice/meeting_main_voice_view.dart b/wgshare/lib/pages/metting/voice/meeting_main_voice_view.dart index cf83781..2ffa27c 100644 --- a/wgshare/lib/pages/metting/voice/meeting_main_voice_view.dart +++ b/wgshare/lib/pages/metting/voice/meeting_main_voice_view.dart @@ -72,11 +72,16 @@ class MeetingMainVoiceComponent extends StatelessWidget { shapePath: ViewSvgPath.getMicrpphonePath() ), ), - Text( - users[index].userName, - style: TextStyle( - fontSize: 12.sp, - color: ColorUtil.Color_255_255_255), + SizedBox( + width: 70, + child: Text( + users[index].userName, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_255_255_255), + ), ) ], ) @@ -89,11 +94,16 @@ class MeetingMainVoiceComponent extends StatelessWidget { width: 20.w, height: 20.h, ), - Text( - users[index].userName, - style: TextStyle( - fontSize: 12.sp, - color: ColorUtil.Color_255_255_255), + SizedBox( + width: 70, + child: Text( + users[index].userName, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 12.sp, + color: ColorUtil.Color_255_255_255), + ), ) ], ),