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,participants: don't render thumbnnail for screen-shares

Saúl Ibarra Corretgé67dca97d1de9
diff --git a/react/features/base/participants/components/ParticipantView.native.js b/react/features/base/participants/components/ParticipantView.native.js
index 1518ec6e17..78bdc11a73 100644
--- a/react/features/base/participants/components/ParticipantView.native.js
+++ b/react/features/base/participants/components/ParticipantView.native.js
@@ -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'],
diff --git a/react/features/filmstrip/components/native/Thumbnail.js b/react/features/filmstrip/components/native/Thumbnail.js
index 736431c644..2c8a1bbca4 100644
--- a/react/features/filmstrip/components/native/Thumbnail.js
+++ b/react/features/filmstrip/components/native/Thumbnail.js
@@ -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 }