[RN] Fix video in audion-only mode

When entering audio-only mode, VideoBridge is instructed to stop sending
remote videos. However, if the instruction fails because DataChannels do
not work, for example, then the app continues to display the remote
videos. Even though they're received in the case of such a failure, no
videos are to be displayed in audio-only mode.
pull/1631/head
Lyubo Marinov 8 years ago
parent 4b2add7aa6
commit 718de31e04
  1. 14
      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

Loading…
Cancel
Save