fix(rn,participants) fix rendering screen-sharing
This commit is contained in:
parent
f2b2b02029
commit
e8df8f75a8
|
@ -12,7 +12,7 @@ import { Container, TintedView } from '../../react';
|
|||
import { connect } from '../../redux';
|
||||
import { TestHint } from '../../testing/components';
|
||||
import { getVideoTrackByParticipant } from '../../tracks';
|
||||
import { getParticipantById, shouldRenderParticipantVideo } from '../functions';
|
||||
import { getParticipantById, isSharedVideoParticipant, shouldRenderParticipantVideo } from '../functions';
|
||||
import { FakeParticipant } from '../types';
|
||||
|
||||
import styles from './styles';
|
||||
|
@ -38,6 +38,11 @@ type Props = {
|
|||
*/
|
||||
_fakeParticipant?: FakeParticipant,
|
||||
|
||||
/**
|
||||
* Whether the participant is a shared video participant.
|
||||
*/
|
||||
_isSharedVideoParticipant: boolean,
|
||||
|
||||
/**
|
||||
* The name of the participant which this component represents.
|
||||
*
|
||||
|
@ -176,6 +181,7 @@ class ParticipantView extends Component<Props> {
|
|||
const {
|
||||
_connectionStatus: connectionStatus,
|
||||
_fakeParticipant,
|
||||
_isSharedVideoParticipant,
|
||||
_renderVideo: renderVideo,
|
||||
_videoTrack: videoTrack,
|
||||
disableVideo,
|
||||
|
@ -191,7 +197,7 @@ class ParticipantView extends Component<Props> {
|
|||
? this.props.testHintId
|
||||
: `org.jitsi.meet.Participant#${this.props.participantId}`;
|
||||
|
||||
const renderSharedVideo = _fakeParticipant && !disableVideo;
|
||||
const renderSharedVideo = _isSharedVideoParticipant && !disableVideo;
|
||||
|
||||
return (
|
||||
<Container
|
||||
|
@ -209,7 +215,7 @@ class ParticipantView extends Component<Props> {
|
|||
|
||||
{ renderSharedVideo && <SharedVideo /> }
|
||||
|
||||
{ !_fakeParticipant && renderVideo
|
||||
{ renderVideo
|
||||
&& <VideoTrack
|
||||
onPress = { onPress }
|
||||
videoTrack = { videoTrack }
|
||||
|
@ -257,6 +263,7 @@ function _mapStateToProps(state, ownProps) {
|
|||
_connectionStatus:
|
||||
connectionStatus
|
||||
|| JitsiParticipantConnectionStatus.ACTIVE,
|
||||
_isSharedVideoParticipant: isSharedVideoParticipant(participant),
|
||||
_fakeParticipant: participant?.fakeParticipant,
|
||||
_participantName: participantName,
|
||||
_renderVideo: shouldRenderParticipantVideo(state, participantId) && !disableVideo,
|
||||
|
|
|
@ -354,6 +354,16 @@ export function isScreenShareParticipant(participant?: Participant): boolean {
|
|||
return isLocalScreenshareParticipant(participant) || isRemoteScreenshareParticipant(participant);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the (fake) participant is a shared video.
|
||||
*
|
||||
* @param {Participant|undefined} participant - The participant entity.
|
||||
* @returns {boolean} - True if it's a shared video participant.
|
||||
*/
|
||||
export function isSharedVideoParticipant(participant?: Participant): boolean {
|
||||
return participant?.fakeParticipant === FakeParticipant.SharedVideo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the fake participant is a whiteboard.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue