rn,participants: don't render thumbnnail for screen-shares
This commit is contained in:
parent
fd0ca76255
commit
67dca97d1d
|
@ -55,6 +55,11 @@ type Props = {
|
|||
*/
|
||||
avatarSize: number,
|
||||
|
||||
/**
|
||||
* Whether video should be disabled for his view.
|
||||
*/
|
||||
disableVideo: ?boolean,
|
||||
|
||||
/**
|
||||
* Callback to invoke when the {@code ParticipantView} is clicked/pressed.
|
||||
*/
|
||||
|
@ -250,7 +255,7 @@ class ParticipantView extends Component<Props> {
|
|||
* @returns {Props}
|
||||
*/
|
||||
function _mapStateToProps(state, ownProps) {
|
||||
const { participantId } = ownProps;
|
||||
const { disableVideo, participantId } = ownProps;
|
||||
let connectionStatus;
|
||||
let participantName;
|
||||
|
||||
|
@ -259,7 +264,7 @@ function _mapStateToProps(state, ownProps) {
|
|||
connectionStatus
|
||||
|| JitsiParticipantConnectionStatus.ACTIVE,
|
||||
_participantName: participantName,
|
||||
_renderVideo: shouldRenderParticipantVideo(state, participantId),
|
||||
_renderVideo: shouldRenderParticipantVideo(state, participantId) && !disableVideo,
|
||||
_videoTrack:
|
||||
getTrackByMediaTypeAndParticipant(
|
||||
state['features/base/tracks'],
|
||||
|
|
|
@ -6,7 +6,7 @@ import type { Dispatch } from 'redux';
|
|||
|
||||
import { ColorSchemeRegistry } from '../../../base/color-scheme';
|
||||
import { openDialog } from '../../../base/dialog';
|
||||
import { Audio, MEDIA_TYPE } from '../../../base/media';
|
||||
import { MEDIA_TYPE, VIDEO_TYPE, Audio } from '../../../base/media';
|
||||
import {
|
||||
PARTICIPANT_ROLE,
|
||||
ParticipantView,
|
||||
|
@ -141,6 +141,7 @@ class Thumbnail extends Component<Props> {
|
|||
const participantInLargeVideo
|
||||
= participantId === largeVideo.participantId;
|
||||
const videoMuted = !videoTrack || videoTrack.muted;
|
||||
const isScreenShare = videoTrack && videoTrack.videoType === VIDEO_TYPE.DESKTOP;
|
||||
|
||||
return (
|
||||
<Container
|
||||
|
@ -161,6 +162,7 @@ class Thumbnail extends Component<Props> {
|
|||
|
||||
<ParticipantView
|
||||
avatarSize = { AVATAR_SIZE }
|
||||
disableVideo = { isScreenShare }
|
||||
participantId = { participantId }
|
||||
style = { _styles.participantViewStyle }
|
||||
tintEnabled = { participantInLargeVideo && !disableTint }
|
||||
|
|
Loading…
Reference in New Issue