video-provider: fix mesh stream sorting with multiple cameras

This commit is contained in:
prlanzarin 2020-09-04 22:23:07 +00:00
parent 2315208887
commit 259a780303

View File

@ -53,8 +53,10 @@ class VideoService {
// Full mesh: sort with the following priority: local -> alphabetic
static sortMeshStreams(s1, s2) {
if (s1.userId === Auth.userID) {
if (s1.userId === Auth.userID && s2.userId !== Auth.userID) {
return -1;
} else if (s2.userId === Auth.userID && s1.userId !== Auth.userID) {
return 1;
} else {
return UserListService.sortUsersByName(s1, s2);
}