Browse Source

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.
master
Saúl Ibarra Corretgé 5 years ago
parent
commit
d1be5742ba
1 changed files with 5 additions and 18 deletions
  1. 5
    18
      react/features/filmstrip/components/native/Thumbnail.js

+ 5
- 18
react/features/filmstrip/components/native/Thumbnail.js View File

6
 
6
 
7
 import { ColorSchemeRegistry } from '../../../base/color-scheme';
7
 import { ColorSchemeRegistry } from '../../../base/color-scheme';
8
 import { openDialog } from '../../../base/dialog';
8
 import { openDialog } from '../../../base/dialog';
9
-import { MEDIA_TYPE, VIDEO_TYPE, Audio } from '../../../base/media';
9
+import { MEDIA_TYPE, VIDEO_TYPE } from '../../../base/media';
10
 import {
10
 import {
11
     PARTICIPANT_ROLE,
11
     PARTICIPANT_ROLE,
12
     ParticipantView,
12
     ParticipantView,
36
 type Props = {
36
 type Props = {
37
 
37
 
38
     /**
38
     /**
39
-     * The Redux representation of the participant's audio track.
39
+     * Whether local audio (microphone) is muted or not.
40
      */
40
      */
41
-    _audioTrack: Object,
41
+    _audioMuted: boolean,
42
 
42
 
43
     /**
43
     /**
44
      * The Redux representation of the state "features/large-video".
44
      * The Redux representation of the state "features/large-video".
122
      */
122
      */
123
     render() {
123
     render() {
124
         const {
124
         const {
125
-            _audioTrack: audioTrack,
125
+            _audioMuted: audioMuted,
126
             _largeVideo: largeVideo,
126
             _largeVideo: largeVideo,
127
             _onClick,
127
             _onClick,
128
             _onShowRemoteVideoMenu,
128
             _onShowRemoteVideoMenu,
136
             tileView
136
             tileView
137
         } = this.props;
137
         } = this.props;
138
 
138
 
139
-        // We don't render audio in any of the following:
140
-        // 1. The audio (source) is muted. There's no practical reason (that we
141
-        //    know of, anyway) why we'd want to render it given that it's
142
-        //    silence (& not even comfort noise).
143
-        // 2. The audio is local. If we were to render local audio, the local
144
-        //    participants would be hearing themselves.
145
-        const audioMuted = !audioTrack || audioTrack.muted;
146
-        const renderAudio = !audioMuted && !audioTrack.local;
147
         const participantId = participant.id;
139
         const participantId = participant.id;
148
         const participantInLargeVideo
140
         const participantInLargeVideo
149
             = participantId === largeVideo.participantId;
141
             = participantId === largeVideo.participantId;
162
                 ] }
154
                 ] }
163
                 touchFeedback = { false }>
155
                 touchFeedback = { false }>
164
 
156
 
165
-                { renderAudio
166
-                    && <Audio
167
-                        stream
168
-                            = { audioTrack.jitsiTrack.getOriginalStream() } /> }
169
-
170
                 <ParticipantView
157
                 <ParticipantView
171
                     avatarSize = { AVATAR_SIZE }
158
                     avatarSize = { AVATAR_SIZE }
172
                     disableVideo = { isScreenShare }
159
                     disableVideo = { isScreenShare }
281
     const renderModeratorIndicator = !_isEveryoneModerator && participant.role === PARTICIPANT_ROLE.MODERATOR;
268
     const renderModeratorIndicator = !_isEveryoneModerator && participant.role === PARTICIPANT_ROLE.MODERATOR;
282
 
269
 
283
     return {
270
     return {
284
-        _audioTrack: audioTrack,
271
+        _audioMuted: audioTrack?.muted ?? true,
285
         _largeVideo: largeVideo,
272
         _largeVideo: largeVideo,
286
         _renderDominantSpeakerIndicator: renderDominantSpeakerIndicator,
273
         _renderDominantSpeakerIndicator: renderDominantSpeakerIndicator,
287
         _renderModeratorIndicator: renderModeratorIndicator,
274
         _renderModeratorIndicator: renderModeratorIndicator,

Loading…
Cancel
Save