|
@@ -64,6 +64,11 @@ type Props = {
|
64
|
64
|
*/
|
65
|
65
|
_filmstripHeight: number,
|
66
|
66
|
|
|
67
|
+ /**
|
|
68
|
+ * Whether this is a recorder or not.
|
|
69
|
+ */
|
|
70
|
+ _iAmRecorder: boolean,
|
|
71
|
+
|
67
|
72
|
/**
|
68
|
73
|
* Whether the filmstrip button is enabled.
|
69
|
74
|
*/
|
|
@@ -235,14 +240,14 @@ class Filmstrip extends PureComponent <Props> {
|
235
|
240
|
* @returns {Object}
|
236
|
241
|
*/
|
237
|
242
|
_calculateIndices(startIndex, stopIndex) {
|
238
|
|
- const { _currentLayout, _thumbnailsReordered } = this.props;
|
|
243
|
+ const { _currentLayout, _iAmRecorder, _thumbnailsReordered } = this.props;
|
239
|
244
|
let start = startIndex;
|
240
|
245
|
let stop = stopIndex;
|
241
|
246
|
|
242
|
247
|
if (_thumbnailsReordered) {
|
243
|
248
|
// In tile view, the indices needs to be offset by 1 because the first thumbnail is that of the local
|
244
|
249
|
// endpoint. The remote participants start from index 1.
|
245
|
|
- if (_currentLayout === LAYOUTS.TILE_VIEW) {
|
|
250
|
+ if (!_iAmRecorder && _currentLayout === LAYOUTS.TILE_VIEW) {
|
246
|
251
|
start = Math.max(startIndex - 1, 0);
|
247
|
252
|
stop = stopIndex - 1;
|
248
|
253
|
}
|
|
@@ -294,18 +299,24 @@ class Filmstrip extends PureComponent <Props> {
|
294
|
299
|
* @returns {string} - The key.
|
295
|
300
|
*/
|
296
|
301
|
_gridItemKey({ columnIndex, rowIndex }) {
|
297
|
|
- const { _columns, _remoteParticipants, _remoteParticipantsLength, _thumbnailsReordered } = this.props;
|
|
302
|
+ const {
|
|
303
|
+ _columns,
|
|
304
|
+ _iAmRecorder,
|
|
305
|
+ _remoteParticipants,
|
|
306
|
+ _remoteParticipantsLength,
|
|
307
|
+ _thumbnailsReordered
|
|
308
|
+ } = this.props;
|
298
|
309
|
const index = (rowIndex * _columns) + columnIndex;
|
299
|
310
|
|
300
|
311
|
// When the thumbnails are reordered, local participant is inserted at index 0.
|
301
|
312
|
const localIndex = _thumbnailsReordered ? 0 : _remoteParticipantsLength;
|
302
|
|
- const remoteIndex = _thumbnailsReordered ? index - 1 : index;
|
|
313
|
+ const remoteIndex = _thumbnailsReordered && !_iAmRecorder ? index - 1 : index;
|
303
|
314
|
|
304
|
|
- if (index > _remoteParticipantsLength) {
|
|
315
|
+ if (index > _remoteParticipantsLength - (_iAmRecorder ? 1 : 0)) {
|
305
|
316
|
return `empty-${index}`;
|
306
|
317
|
}
|
307
|
318
|
|
308
|
|
- if (index === localIndex) {
|
|
319
|
+ if (!_iAmRecorder && index === localIndex) {
|
309
|
320
|
return 'local';
|
310
|
321
|
}
|
311
|
322
|
|
|
@@ -528,7 +539,7 @@ class Filmstrip extends PureComponent <Props> {
|
528
|
539
|
*/
|
529
|
540
|
function _mapStateToProps(state) {
|
530
|
541
|
const toolbarButtons = getToolbarButtons(state);
|
531
|
|
- const { testing = {} } = state['features/base/config'];
|
|
542
|
+ const { testing = {}, iAmRecorder } = state['features/base/config'];
|
532
|
543
|
const enableThumbnailReordering = testing.enableThumbnailReordering ?? true;
|
533
|
544
|
const { visible, remoteParticipants } = state['features/filmstrip'];
|
534
|
545
|
const reduceHeight = state['features/toolbox'].visible && toolbarButtons.length;
|
|
@@ -596,6 +607,7 @@ function _mapStateToProps(state) {
|
596
|
607
|
_currentLayout,
|
597
|
608
|
_filmstripHeight: remoteFilmstripHeight,
|
598
|
609
|
_filmstripWidth: remoteFilmstripWidth,
|
|
610
|
+ _iAmRecorder: Boolean(iAmRecorder),
|
599
|
611
|
_isFilmstripButtonEnabled: isButtonEnabled('filmstrip', state),
|
600
|
612
|
_remoteParticipantsLength: remoteParticipants.length,
|
601
|
613
|
_remoteParticipants: remoteParticipants,
|