diff --git a/packages/hms_room_kit/lib/src/meeting/meeting_grid_component.dart b/packages/hms_room_kit/lib/src/meeting/meeting_grid_component.dart index bc0e717c8..615ef6f0e 100644 --- a/packages/hms_room_kit/lib/src/meeting/meeting_grid_component.dart +++ b/packages/hms_room_kit/lib/src/meeting/meeting_grid_component.dart @@ -28,37 +28,28 @@ class MeetingGridComponent extends StatelessWidget { Widget build(BuildContext context) { return Selector< MeetingStore, - Tuple7, bool, int, int, MeetingMode, - PeerTrackNode?, int>>( - selector: (_, meetingStore) => Tuple7( + Tuple6, bool, int, int, MeetingMode, + int>>( + selector: (_, meetingStore) => Tuple6( meetingStore.peerTracks, meetingStore.isHLSLink, meetingStore.peerTracks.length, meetingStore.screenShareCount, meetingStore.meetingMode, - meetingStore.peerTracks.isNotEmpty - ? meetingStore.peerTracks[meetingStore.screenShareCount] - : null, meetingStore.viewControllers.length), builder: (_, data, __) { - if (data.item3 == 0 || data.item7 == 0) { - return Center( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - CircularProgressIndicator( - strokeWidth: 2, - color: HMSThemeColors.primaryDefault, - ), - const SizedBox( - height: 10, - ), - if (context.read().peers.isNotEmpty) - HMSTitleText( - text: "Please wait for broadcaster to join", - textColor: HMSThemeColors.onSurfaceHighEmphasis) - ], - )); + + ///If there are no peerTracks or the view controllers are empty we show an empty tapable container + if (data.item3 == 0 || data.item6 == 0) { + return GestureDetector( + onTap: () => visibilityController?.toggleControlsVisibility(), + child: + Container( + color: Colors.transparent, + height: double.infinity, + width: double.infinity, + ) + ); } return Selector>( selector: (_, meetingStore) => diff --git a/packages/hms_room_kit/lib/src/meeting/meeting_store.dart b/packages/hms_room_kit/lib/src/meeting/meeting_store.dart index 3b8bdd719..7318b7395 100644 --- a/packages/hms_room_kit/lib/src/meeting/meeting_store.dart +++ b/packages/hms_room_kit/lib/src/meeting/meeting_store.dart @@ -843,8 +843,8 @@ class MeetingStore extends ChangeNotifier if (each.isLocal) { int index = peerTracks .indexWhere((element) => element.uid == "${each.peerId}mainVideo"); - if (index == -1 && - (each.audioTrack != null || each.videoTrack != null)) { + if (index == -1) { + ///We add tile for local peer irrespective of whether it can publish or not peerTracks.add(PeerTrackNode( peer: each, uid: "${each.peerId}mainVideo",