diff --git a/packages/hms_room_kit/lib/src/hls_viewer/hls_hand_raise_menu.dart b/packages/hms_room_kit/lib/src/hls_viewer/hls_hand_raise_menu.dart index 7d76ff6b3..4f8ffd04f 100644 --- a/packages/hms_room_kit/lib/src/hls_viewer/hls_hand_raise_menu.dart +++ b/packages/hms_room_kit/lib/src/hls_viewer/hls_hand_raise_menu.dart @@ -21,31 +21,33 @@ class HLSHandRaiseMenu extends StatelessWidget { return Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - Selector( - selector: (_, meetingStore) => meetingStore.isRaisedHand, - builder: (_, isRaisedHand, __) { - return HMSEmbeddedButton( - onTap: () => { - context.read().toggleLocalPeerHandRaise(), - }, - enabledBorderColor: HMSThemeColors.surfaceBrighter, - offColor: HMSThemeColors.surfaceDefault, - disabledBorderColor: HMSThemeColors.surfaceDefault, - onColor: HMSThemeColors.surfaceBrighter, - isActive: isRaisedHand, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: SvgPicture.asset( - isRaisedHand - ? "packages/hms_room_kit/lib/src/assets/icons/hand_off.svg" - : "packages/hms_room_kit/lib/src/assets/icons/hand_outline.svg", - colorFilter: ColorFilter.mode( - HMSThemeColors.onSurfaceHighEmphasis, BlendMode.srcIn), - semanticsLabel: "hand_raise_button", + if (HMSRoomLayout.isHandRaiseEnabled) + Selector( + selector: (_, meetingStore) => meetingStore.isRaisedHand, + builder: (_, isRaisedHand, __) { + return HMSEmbeddedButton( + onTap: () => { + context.read().toggleLocalPeerHandRaise(), + }, + enabledBorderColor: HMSThemeColors.surfaceBrighter, + offColor: HMSThemeColors.surfaceDefault, + disabledBorderColor: HMSThemeColors.surfaceDefault, + onColor: HMSThemeColors.surfaceBrighter, + isActive: isRaisedHand, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: SvgPicture.asset( + isRaisedHand + ? "packages/hms_room_kit/lib/src/assets/icons/hand_off.svg" + : "packages/hms_room_kit/lib/src/assets/icons/hand_outline.svg", + colorFilter: ColorFilter.mode( + HMSThemeColors.onSurfaceHighEmphasis, + BlendMode.srcIn), + semanticsLabel: "hand_raise_button", + ), ), - ), - ); - }), + ); + }), const SizedBox( width: 8, ), diff --git a/packages/hms_room_kit/lib/src/layout_api/hms_conferencing_items.dart b/packages/hms_room_kit/lib/src/layout_api/hms_conferencing_items.dart index 6ae2eefe4..53c90d92f 100644 --- a/packages/hms_room_kit/lib/src/layout_api/hms_conferencing_items.dart +++ b/packages/hms_room_kit/lib/src/layout_api/hms_conferencing_items.dart @@ -109,6 +109,7 @@ class Elements { Map? emojiReactions; OnStageExp? onStageExp; Map? brb; + Map? handRaise; Elements( {this.header, @@ -117,7 +118,8 @@ class Elements { this.videoTileLayout, this.emojiReactions, this.onStageExp, - this.brb}); + this.brb, + this.handRaise}); Elements.fromJson(Map? json) { if (json == null) { @@ -128,6 +130,7 @@ class Elements { emojiReactions = null; onStageExp = null; brb = null; + handRaise = null; return; } @@ -146,6 +149,7 @@ class Elements { ? OnStageExp.fromJson(json['on_stage_exp']) : null; brb = json.containsKey("brb") ? json["brb"] : null; + handRaise = json.containsKey("hand_raise") ? json["hand_raise"] : null; } Map toJson() { diff --git a/packages/hms_room_kit/lib/src/layout_api/hms_room_layout.dart b/packages/hms_room_kit/lib/src/layout_api/hms_room_layout.dart index 184d7e749..2675197a0 100644 --- a/packages/hms_room_kit/lib/src/layout_api/hms_room_layout.dart +++ b/packages/hms_room_kit/lib/src/layout_api/hms_room_layout.dart @@ -217,6 +217,7 @@ class HMSRoomLayout { static Chat? chatData; static bool isParticipantsListEnabled = true; static bool isBRBEnabled = true; + static bool isHandRaiseEnabled = true; static List? offStageRoles = []; static bool skipPreviewForRole = false; static bool skipPreview = false; @@ -265,6 +266,9 @@ class HMSRoomLayout { isBRBEnabled = roleLayoutData?.screens?.conferencing?.defaultConf?.elements?.brb != null; + isHandRaiseEnabled = roleLayoutData + ?.screens?.conferencing?.defaultConf?.elements?.handRaise != + null; offStageRoles = roleLayoutData?.screens?.conferencing?.defaultConf ?.elements?.onStageExp?.offStageRoles; skipPreviewForRole = roleLayoutData?.screens?.conferencing?.defaultConf @@ -279,6 +283,9 @@ class HMSRoomLayout { isBRBEnabled = roleLayoutData ?.screens?.conferencing?.hlsLiveStreaming?.elements?.brb != null; + isHandRaiseEnabled = roleLayoutData + ?.screens?.conferencing?.hlsLiveStreaming?.elements?.handRaise != + null; offStageRoles = roleLayoutData?.screens?.conferencing?.hlsLiveStreaming ?.elements?.onStageExp?.offStageRoles; skipPreviewForRole = roleLayoutData diff --git a/packages/hms_room_kit/lib/src/widgets/bottom_sheets/app_utilities_bottom_sheet.dart b/packages/hms_room_kit/lib/src/widgets/bottom_sheets/app_utilities_bottom_sheet.dart index bb33d6760..dfeee8b86 100644 --- a/packages/hms_room_kit/lib/src/widgets/bottom_sheets/app_utilities_bottom_sheet.dart +++ b/packages/hms_room_kit/lib/src/widgets/bottom_sheets/app_utilities_bottom_sheet.dart @@ -213,24 +213,24 @@ class _AppUtilitiesBottomSheetState extends State { meetingStore.isBRB ? "I'm Back" : "Be Right Back"), ///This renders the raise hand option - - MoreOptionItem( - onTap: () async { - context.read().toggleLocalPeerHandRaise(); - Navigator.pop(context); - }, - isActive: meetingStore.isRaisedHand, - optionIcon: SvgPicture.asset( - "packages/hms_room_kit/lib/src/assets/icons/hand_outline.svg", - height: 20, - width: 20, - colorFilter: ColorFilter.mode( - HMSThemeColors.onSurfaceHighEmphasis, - BlendMode.srcIn), - ), - optionText: meetingStore.isRaisedHand - ? "Lower Hand" - : "Raise Hand"), + if (HMSRoomLayout.isHandRaiseEnabled) + MoreOptionItem( + onTap: () async { + context.read().toggleLocalPeerHandRaise(); + Navigator.pop(context); + }, + isActive: meetingStore.isRaisedHand, + optionIcon: SvgPicture.asset( + "packages/hms_room_kit/lib/src/assets/icons/hand_outline.svg", + height: 20, + width: 20, + colorFilter: ColorFilter.mode( + HMSThemeColors.onSurfaceHighEmphasis, + BlendMode.srcIn), + ), + optionText: meetingStore.isRaisedHand + ? "Lower Hand" + : "Raise Hand"), ///This renders the polls and quizzes option if ((meetingStore.localPeer?.role.permissions.pollRead ?? diff --git a/packages/hms_room_kit/lib/src/widgets/chat_widgets/chat_text_utility.dart b/packages/hms_room_kit/lib/src/widgets/chat_widgets/chat_text_utility.dart index e1212e41f..6fce81504 100644 --- a/packages/hms_room_kit/lib/src/widgets/chat_widgets/chat_text_utility.dart +++ b/packages/hms_room_kit/lib/src/widgets/chat_widgets/chat_text_utility.dart @@ -45,11 +45,7 @@ class _ChatTextUtilityState extends State void didChangeMetrics() { final bool isKeyboardOpen = (MediaQuery.of(context).viewInsets.bottom).toInt() > 0; - if (Platform.isAndroid) { - showMenu = isKeyboardOpen; - } else { - showMenu = !isKeyboardOpen; - } + showMenu = !isKeyboardOpen; setState(() {}); } diff --git a/packages/hmssdk_flutter/example/ios/Podfile.lock b/packages/hmssdk_flutter/example/ios/Podfile.lock index cd8639566..df422136c 100644 --- a/packages/hmssdk_flutter/example/ios/Podfile.lock +++ b/packages/hmssdk_flutter/example/ios/Podfile.lock @@ -332,4 +332,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 9fb9f6e431a2c6c79942252e94b241ac7972ac90 -COCOAPODS: 1.15.2 +COCOAPODS: 1.14.3 diff --git a/packages/hmssdk_flutter/example/lib/foreground_task_handler.dart b/packages/hmssdk_flutter/example/lib/foreground_task_handler.dart index ade4caddb..be95acb5b 100644 --- a/packages/hmssdk_flutter/example/lib/foreground_task_handler.dart +++ b/packages/hmssdk_flutter/example/lib/foreground_task_handler.dart @@ -52,6 +52,7 @@ Future initForegroundTask() async { if (isPermissionsGiven) { FlutterForegroundTask.init( androidNotificationOptions: AndroidNotificationOptions( + foregroundServiceType: AndroidForegroundServiceType.CAMERA, channelId: '100ms_flutter_notification', channelName: '100ms Flutter Notification', channelDescription: diff --git a/packages/hmssdk_flutter/example/pubspec.yaml b/packages/hmssdk_flutter/example/pubspec.yaml index 4df1cfdf5..1c03b51b4 100644 --- a/packages/hmssdk_flutter/example/pubspec.yaml +++ b/packages/hmssdk_flutter/example/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: mobile_scanner: app_links: uuid: - flutter_foreground_task: ^6.1.3 + flutter_foreground_task: ^6.2.0 flutter_svg: any provider: any