Преглед на файлове

Merge pull request #3630 from virtuacoplenny/lenny/youtube-1-on-1

fix(filmstrip): show thumbnails in 1-on-1 with a fake participant
master
virtuacoplenny преди 6 години
родител
ревизия
957606b3f8
No account linked to committer's email address
променени са 2 файла, в които са добавени 19 реда и са изтрити 2 реда
  1. 14
    0
      react/features/base/participants/functions.js
  2. 5
    2
      react/features/filmstrip/functions.web.js

+ 14
- 0
react/features/base/participants/functions.js Целия файл

@@ -125,6 +125,20 @@ export function getParticipantCount(stateful: Object | Function) {
125 125
     return getParticipants(stateful).length;
126 126
 }
127 127
 
128
+/**
129
+ * Returns a count of the known participants in the passed in redux state,
130
+ * including fake participants.
131
+ *
132
+ * @param {(Function|Object|Participant[])} stateful - The redux state
133
+ * features/base/participants, the (whole) redux state, or redux's
134
+ * {@code getState} function to be used to retrieve the state
135
+ * features/base/participants.
136
+ * @returns {number}
137
+ */
138
+export function getParticipantCountWithFake(stateful: Object | Function) {
139
+    return _getAllParticipants(stateful).length;
140
+}
141
+
128 142
 /**
129 143
  * Returns participant's display name.
130 144
  *

+ 5
- 2
react/features/filmstrip/functions.web.js Целия файл

@@ -1,7 +1,7 @@
1 1
 // @flow
2 2
 
3 3
 import {
4
-    getParticipantCount,
4
+    getParticipantCountWithFake,
5 5
     getPinnedParticipant
6 6
 } from '../base/participants';
7 7
 import { toState } from '../base/redux';
@@ -36,7 +36,10 @@ export function shouldRemoteVideosBeVisible(state: Object) {
36 36
         return false;
37 37
     }
38 38
 
39
-    const participantCount = getParticipantCount(state);
39
+    // Include fake participants to derive how many thumbnails are dispalyed,
40
+    // as it is assumed all participants, including fake, will be displayed
41
+    // in the filmstrip.
42
+    const participantCount = getParticipantCountWithFake(state);
40 43
     let pinnedParticipant;
41 44
 
42 45
     return Boolean(

Loading…
Отказ
Запис