From d1be5742ba9895919dfe326c2eb1c00ab1fe497c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 13 Sep 2019 12:00:08 +0200 Subject: [PATCH] thumbnail: remove dead code Audio streams are automatically played by WebRTC and this won't change, probably ever. There is no point in having checks and an Audio component which does nothing. --- .../filmstrip/components/native/Thumbnail.js | 23 ++++--------------- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/react/features/filmstrip/components/native/Thumbnail.js b/react/features/filmstrip/components/native/Thumbnail.js index 7135090d3..dc87cdb0e 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 { MEDIA_TYPE, VIDEO_TYPE, Audio } from '../../../base/media'; +import { MEDIA_TYPE, VIDEO_TYPE } from '../../../base/media'; import { PARTICIPANT_ROLE, ParticipantView, @@ -36,9 +36,9 @@ import VideoMutedIndicator from './VideoMutedIndicator'; type Props = { /** - * The Redux representation of the participant's audio track. + * Whether local audio (microphone) is muted or not. */ - _audioTrack: Object, + _audioMuted: boolean, /** * The Redux representation of the state "features/large-video". @@ -122,7 +122,7 @@ class Thumbnail extends Component { */ render() { const { - _audioTrack: audioTrack, + _audioMuted: audioMuted, _largeVideo: largeVideo, _onClick, _onShowRemoteVideoMenu, @@ -136,14 +136,6 @@ class Thumbnail extends Component { tileView } = this.props; - // We don't render audio in any of the following: - // 1. The audio (source) is muted. There's no practical reason (that we - // know of, anyway) why we'd want to render it given that it's - // silence (& not even comfort noise). - // 2. The audio is local. If we were to render local audio, the local - // participants would be hearing themselves. - const audioMuted = !audioTrack || audioTrack.muted; - const renderAudio = !audioMuted && !audioTrack.local; const participantId = participant.id; const participantInLargeVideo = participantId === largeVideo.participantId; @@ -162,11 +154,6 @@ class Thumbnail extends Component { ] } touchFeedback = { false }> - { renderAudio - &&