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(connection-indicator) Fix detecting local/remote participant
hmuresanf2f545a57f6e
diff --git a/react/features/connection-indicator/components/web/ConnectionIndicator.js b/react/features/connection-indicator/components/web/ConnectionIndicator.jsindex 0a1a8e24e3..c8d10955ea 100644--- a/react/features/connection-indicator/components/web/ConnectionIndicator.js+++ b/react/features/connection-indicator/components/web/ConnectionIndicator.js@@ -92,11 +92,6 @@ type Props = AbstractProps & {*/iconSize: number,- /**- * Whether or not the displays stats are for local video.- */- isLocalVideo: boolean,-/*** Relative to the icon from where the popover for more connection details* should display.@@ -149,7 +144,9 @@ class ConnectionIndicator extends AbstractConnectionIndicator<Props, AbstractStareturn (<PopoverclassName = { rootClassNames }- content = { <ConnectionIndicatorContent participantId = { this.props.participantId } /> }+ content = { <ConnectionIndicatorContent+ inheritedStats = { this.state.stats }+ participantId = { this.props.participantId } /> }disablePopover = { !this.props.enableStatsDisplay }position = { this.props.statsPopoverPosition }><div className = 'popover-trigger'>diff --git a/react/features/connection-indicator/components/web/ConnectionIndicatorContent.js b/react/features/connection-indicator/components/web/ConnectionIndicatorContent.jsindex 412ff08bbd..857bd29ecb 100644--- a/react/features/connection-indicator/components/web/ConnectionIndicatorContent.js+++ b/react/features/connection-indicator/components/web/ConnectionIndicatorContent.js@@ -58,6 +58,11 @@ const QUALITY_TO_WIDTH: Array<Object> = [*/type Props = AbstractProps & {+ /**+ * The audio SSRC of this client.+ */+ _audioSsrc: number,+/*** The current condition of the user's connection, matching one of the* enumerated values in the library.@@ -65,51 +70,51 @@ type Props = AbstractProps & {_connectionStatus: string,/**- * The audio SSRC of this client.+ * Whether or not should display the "Show More" link in the local video+ * stats table.*/- audioSsrc: number,+ _disableShowMoreStats: boolean,/**- * Css class to apply on container+ * Whether or not should display the "Save Logs" link in the local video+ * stats table.*/- className: string,+ _enableSaveLogs: boolean,/**- * The Redux dispatch function.+ * Whether or not the displays stats are for local video.*/- dispatch: Dispatch<any>,+ _isLocalVideo: boolean,/**- * Whether or not should display the "Show More" link in the local video- * stats table.+ * Invoked to save the conference logs.*/- disableShowMoreStats: boolean,+ _onSaveLogs: Function,/**- * Whether or not should display the "Save Logs" link in the local video- * stats table.+ * The video SSRC of this client.*/- enableSaveLogs: boolean,+ _videoSsrc: number,/**- * Whether or not the displays stats are for local video.+ * Css class to apply on container*/- isLocalVideo: boolean,+ className: string,/**- * Invoked to obtain translated strings.+ * The Redux dispatch function.*/- t: Function,+ dispatch: Dispatch<any>,/**- * The video SSRC of this client.+ * Optional param for passing existing connection stats on component instantiation*/- videoSsrc: number,+ inheritedStats: Object,/**- * Invoked to save the conference logs.+ * Invoked to obtain translated strings.*/- _onSaveLogs: Function+ t: Function};/**@@ -143,7 +148,7 @@ class ConnectionIndicatorContent extends AbstractConnectionIndicator<Props, StatautoHideTimeout: undefined,showIndicator: false,showMoreStats: false,- stats: {}+ stats: props.inheritedStats || {}};// Bind event handlers so they are only bound once for every instance.@@ -174,17 +179,17 @@ class ConnectionIndicatorContent extends AbstractConnectionIndicator<Props, Statreturn (<ConnectionStatsTable- audioSsrc = { this.props.audioSsrc }+ audioSsrc = { this.props._audioSsrc }bandwidth = { bandwidth }bitrate = { bitrate }bridgeCount = { bridgeCount }codec = { codec }connectionSummary = { this._getConnectionStatusTip() }- disableShowMoreStats = { this.props.disableShowMoreStats }+ disableShowMoreStats = { this.props._disableShowMoreStats }e2eRtt = { e2eRtt }- enableSaveLogs = { this.props.enableSaveLogs }+ enableSaveLogs = { this.props._enableSaveLogs }framerate = { framerate }- isLocalVideo = { this.props.isLocalVideo }+ isLocalVideo = { this.props._isLocalVideo }maxEnabledResolution = { maxEnabledResolution }onSaveLogs = { this.props._onSaveLogs }onShowMore = { this._onToggleShowMore }@@ -195,7 +200,7 @@ class ConnectionIndicatorContent extends AbstractConnectionIndicator<Props, StatserverRegion = { serverRegion }shouldShowMore = { this.state.showMoreStats }transport = { transport }- videoSsrc = { this.props.videoSsrc } />+ videoSsrc = { this.props._videoSsrc } />);}@@ -303,8 +308,9 @@ export function _mapStateToProps(state: Object, ownProps: Props) {= participantId ? getParticipantById(state, participantId) : getLocalParticipant(state);const props = {_connectionStatus: participant?.connectionStatus,- enableSaveLogs: state['features/base/config'].enableSaveLogs,- disableShowMoreStats: state['features/base/config'].disableShowMoreStats+ _enableSaveLogs: state['features/base/config'].enableSaveLogs,+ _disableShowMoreStats: state['features/base/config'].disableShowMoreStats,+ _isLocalVideo: participant?.local};if (conference) {@@ -315,8 +321,8 @@ export function _mapStateToProps(state: Object, ownProps: Props) {return {...props,- audioSsrc: firstAudioTrack ? conference.getSsrcByTrack(firstAudioTrack.jitsiTrack) : undefined,- videoSsrc: firstVideoTrack ? conference.getSsrcByTrack(firstVideoTrack.jitsiTrack) : undefined+ _audioSsrc: firstAudioTrack ? conference.getSsrcByTrack(firstAudioTrack.jitsiTrack) : undefined,+ _videoSsrc: firstVideoTrack ? conference.getSsrcByTrack(firstVideoTrack.jitsiTrack) : undefined};}diff --git a/react/features/filmstrip/components/web/Thumbnail.js b/react/features/filmstrip/components/web/Thumbnail.jsindex bdf2b39587..ef36b466cc 100644--- a/react/features/filmstrip/components/web/Thumbnail.js+++ b/react/features/filmstrip/components/web/Thumbnail.js@@ -652,7 +652,7 @@ class Thumbnail extends Component<Props, State> {} = this.props;const { isHovered } = this.state;const showConnectionIndicator = isHovered || !_connectionIndicatorAutoHideEnabled;- const { id, local = false, dominantSpeaker = false } = _participant;+ const { id, dominantSpeaker = false } = _participant;const showDominantSpeaker = !_isDominantSpeakerDisabled && dominantSpeaker;let statsPopoverPosition, tooltipPosition;@@ -677,7 +677,6 @@ class Thumbnail extends Component<Props, State> {alwaysVisible = { showConnectionIndicator }enableStatsDisplay = { true }iconSize = { iconSize }- isLocalVideo = { local }participantId = { id }statsPopoverPosition = { statsPopoverPosition } />}