Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

[RN] Fix video in audion-only mode

Lyubo Marinov718de31e0420
diff --git a/react/features/base/participants/components/ParticipantView.native.js b/react/features/base/participants/components/ParticipantView.native.js
index 82ce2acb04..272f3b4d64 100644
--- a/react/features/base/participants/components/ParticipantView.native.js
+++ b/react/features/base/participants/components/ParticipantView.native.js
@@ -27,6 +27,14 @@ class ParticipantView extends Component {
* @static
*/
static propTypes = {
+ /**
+ * The indicator which determines whether conferencing is in audio-only
+ * mode.
+ *
+ * @private
+ */
+ _audioOnly: React.PropTypes.bool,
+
/**
* The source (e.g. URI, URL) of the avatar image of the participant
* with {@link #participantId}.
@@ -107,7 +115,9 @@ class ParticipantView extends Component {
// updated only after videoTrack is rendered.
const waitForVideoStarted = false;
const renderVideo
- = (connectionStatus === JitsiParticipantConnectionStatus.ACTIVE)
+ = !this.props._audioOnly
+ && (connectionStatus
+ === JitsiParticipantConnectionStatus.ACTIVE)
&& shouldRenderVideoTrack(videoTrack, waitForVideoStarted);
// Is the avatar to be rendered?
@@ -170,6 +180,7 @@ function _toBoolean(value, undefinedValue) {
* (instance of) ParticipantView.
* @private
* @returns {{
+ * _audioOnly: boolean,
* _avatar: string,
* _connectionStatus: string,
* _videoTrack: Track
@@ -190,6 +201,7 @@ function _mapStateToProps(state, ownProps) {
}
return {
+ _audioOnly: state['features/base/conference'].audioOnly,
_avatar: avatar,
_connectionStatus:
connectionStatus