fix(Filmstrip): Send only visible endpoints to jvb

This commit is contained in:
Hristo Terezov 2021-07-27 18:01:18 -05:00
parent bc9f5773fb
commit 619acaca24
1 changed files with 10 additions and 8 deletions

View File

@ -284,10 +284,10 @@ class Filmstrip extends PureComponent <Props> {
* @param {Object} data - Information about the rendered items.
* @returns {void}
*/
_onListItemsRendered({ overscanStartIndex, overscanStopIndex }) {
_onListItemsRendered({ visibleStartIndex, visibleStopIndex }) {
const { dispatch } = this.props;
dispatch(setVisibleRemoteParticipants(overscanStartIndex, overscanStopIndex));
dispatch(setVisibleRemoteParticipants(visibleStartIndex, visibleStopIndex));
}
_onGridItemsRendered: Object => void;
@ -299,14 +299,14 @@ class Filmstrip extends PureComponent <Props> {
* @returns {void}
*/
_onGridItemsRendered({
overscanColumnStartIndex,
overscanColumnStopIndex,
overscanRowStartIndex,
overscanRowStopIndex
visibleColumnStartIndex,
visibleColumnStopIndex,
visibleRowStartIndex,
visibleRowStopIndex
}) {
const { _columns, dispatch } = this.props;
const startIndex = (overscanRowStartIndex * _columns) + overscanColumnStartIndex;
const endIndex = (overscanRowStopIndex * _columns) + overscanColumnStopIndex;
const startIndex = (visibleRowStartIndex * _columns) + visibleColumnStartIndex;
const endIndex = (visibleRowStopIndex * _columns) + visibleColumnStopIndex;
dispatch(setVisibleRemoteParticipants(startIndex, endIndex));
}
@ -345,6 +345,7 @@ class Filmstrip extends PureComponent <Props> {
initialScrollTop = { 0 }
itemKey = { this._gridItemKey }
onItemsRendered = { this._onGridItemsRendered }
overscanRowCount = { 1 }
rowCount = { _rows }
rowHeight = { _thumbnailHeight + TILE_VERTICAL_MARGIN }
width = { _filmstripWidth }>
@ -363,6 +364,7 @@ class Filmstrip extends PureComponent <Props> {
itemKey: this._listItemKey,
itemSize: 0,
onItemsRendered: this._onListItemsRendered,
overscanCount: 1,
width: _filmstripWidth,
style: {
willChange: 'auto'