Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(disableSelfView) Fix issue with remote participant video (#10582)
Robert Pintiliif8908c143e6f
diff --git a/react/features/filmstrip/components/native/Filmstrip.js b/react/features/filmstrip/components/native/Filmstrip.jsindex d28b53cd66..394581cf29 100644--- a/react/features/filmstrip/components/native/Filmstrip.js+++ b/react/features/filmstrip/components/native/Filmstrip.js@@ -176,7 +176,9 @@ class Filmstrip extends PureComponent<Props> {* @returns {void}*/_onViewableItemsChanged({ viewableItems = [] }) {- if (!this._separateLocalThumbnail && viewableItems[0]?.index === 0) {+ const { _disableSelfView } = this.props;++ if (!this._separateLocalThumbnail && !_disableSelfView && viewableItems[0]?.index === 0) {// Skip the local thumbnail.viewableItems.shift();}@@ -189,7 +191,7 @@ class Filmstrip extends PureComponent<Props> {let startIndex = viewableItems[0].index;let endIndex = viewableItems[viewableItems.length - 1].index;- if (!this._separateLocalThumbnail) {+ if (!this._separateLocalThumbnail && !_disableSelfView) {// We are off by one in the remote participants array.startIndex -= 1;endIndex -= 1;diff --git a/react/features/filmstrip/components/native/TileView.js b/react/features/filmstrip/components/native/TileView.jsindex 39b19c0a54..cff0cf681c 100644--- a/react/features/filmstrip/components/native/TileView.js+++ b/react/features/filmstrip/components/native/TileView.js@@ -152,7 +152,9 @@ class TileView extends PureComponent<Props> {* @returns {void}*/_onViewableItemsChanged({ viewableItems = [] }: { viewableItems: Array<Object> }) {- if (viewableItems[0]?.index === 0) {+ const { _disableSelfView } = this.props;++ if (viewableItems[0]?.index === 0 && !_disableSelfView) {// Skip the local thumbnail.viewableItems.shift();}@@ -163,8 +165,8 @@ class TileView extends PureComponent<Props> {}// We are off by one in the remote participants array.- const startIndex = viewableItems[0].index - 1;- const endIndex = viewableItems[viewableItems.length - 1].index - 1;+ const startIndex = viewableItems[0].index - (_disableSelfView ? 0 : 1);+ const endIndex = viewableItems[viewableItems.length - 1].index - (_disableSelfView ? 0 : 1);this.props.dispatch(setVisibleRemoteParticipants(startIndex, endIndex));}diff --git a/react/features/filmstrip/components/web/Filmstrip.js b/react/features/filmstrip/components/web/Filmstrip.jsindex 8f9f8600ad..67ca48ca0e 100644--- a/react/features/filmstrip/components/web/Filmstrip.js+++ b/react/features/filmstrip/components/web/Filmstrip.js@@ -249,11 +249,11 @@ class Filmstrip extends PureComponent <Props> {* @returns {Object}*/_calculateIndices(startIndex, stopIndex) {- const { _currentLayout, _iAmRecorder, _thumbnailsReordered } = this.props;+ const { _currentLayout, _iAmRecorder, _thumbnailsReordered, _disableSelfView } = this.props;let start = startIndex;let stop = stopIndex;- if (_thumbnailsReordered) {+ if (_thumbnailsReordered && !_disableSelfView) {// In tile view, the indices needs to be offset by 1 because the first thumbnail is that of the local// endpoint. The remote participants start from index 1.if (!_iAmRecorder && _currentLayout === LAYOUTS.TILE_VIEW) {