Skip to content

Commit

Permalink
fixed local user video hide issue when multiple users join on same ch…
Browse files Browse the repository at this point in the history
…annel
  • Loading branch information
NilupulTreinetic committed Mar 14, 2024
1 parent 4cf8315 commit 92fea2d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/controllers/session_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ class SessionController extends ValueNotifier<AgoraSettings> {
clientRoleType: ClientRoleType.clientRoleBroadcaster,
),
);
removeUser(uid: value.localUid);
}
removeUser(uid: value.localUid);
}

void updateUserVideo({required int uid, required bool videoDisabled}) {
Expand All @@ -263,7 +263,11 @@ class SessionController extends ValueNotifier<AgoraSettings> {
value = value.copyWith(isLocalUserMuted: muted);
// if remote user updates audio
} else if (uid == value.mainAgoraUser.uid) {
value = value.copyWith(mainAgoraUser: AgoraUser(uid: uid, muted: muted));
value = value.copyWith(
mainAgoraUser: AgoraUser(
uid: uid,
muted: muted,
videoDisabled: value.mainAgoraUser.videoDisabled));
} else {
List<AgoraUser> tempList = value.users;
int indexOfUser = tempList.indexWhere((element) => element.uid == uid);
Expand Down

0 comments on commit 92fea2d

Please sign in to comment.