Bladeren bron

ref(local-audio): remove rendering of local audio

The local audio stream is attached to an audio element that is
always muted. As such, local audio is not being rendered and
the attaching may just not be needed at all.
master
Leonard Kim 7 jaren geleden
bovenliggende
commit
16fbf90a00
3 gewijzigde bestanden met toevoegingen van 2 en 23 verwijderingen
  1. 2
    1
      modules/UI/UI.js
  2. 0
    4
      modules/UI/videolayout/LocalVideo.js
  3. 0
    18
      modules/UI/videolayout/VideoLayout.js

+ 2
- 1
modules/UI/UI.js Bestand weergeven

@@ -366,7 +366,8 @@ UI.unbindEvents = () => {
366 366
 UI.addLocalStream = track => {
367 367
     switch (track.getType()) {
368 368
     case 'audio':
369
-        VideoLayout.changeLocalAudio(track);
369
+        // Local audio is not rendered so no further action is needed at this
370
+        // point.
370 371
         break;
371 372
     case 'video':
372 373
         VideoLayout.changeLocalVideo(track);

+ 0
- 4
modules/UI/videolayout/LocalVideo.js Bestand weergeven

@@ -57,10 +57,6 @@ LocalVideo.prototype.createContainer = function () {
57 57
     containerSpan.innerHTML = `
58 58
         <div class = 'videocontainer__background'></div>
59 59
         <span id = 'localVideoWrapper'></span>
60
-        <audio
61
-            autoplay = true
62
-            id = 'localAudio'
63
-            muted = true></audio>
64 60
         <div class = 'videocontainer__toolbar'></div>
65 61
         <div class = 'videocontainer__toptoolbar'></div>
66 62
         <div class = 'videocontainer__hoverOverlay'></div>

+ 0
- 18
modules/UI/videolayout/VideoLayout.js Bestand weergeven

@@ -170,24 +170,6 @@ var VideoLayout = {
170 170
             largeVideo.updateLargeVideoAudioLevel(lvl);
171 171
     },
172 172
 
173
-    changeLocalAudio (stream) {
174
-        let localAudio = document.getElementById('localAudio');
175
-        localAudio = stream.attach(localAudio);
176
-
177
-        // Now when Temasys plugin is converting also <audio> elements to
178
-        // plugin's <object>s, in current layout it will capture click events
179
-        // before it reaches the local video object. We hide it here in order
180
-        // to prevent that.
181
-        //if (RTCBrowserType.isIExplorer()) {
182
-            // The issue is not present on Safari. Also if we hide it in Safari
183
-            // then the local audio track will have 'enabled' flag set to false
184
-            // which will result in audio mute issues
185
-            //  $(localAudio).hide();
186
-            localAudio.width = 1;
187
-            localAudio.height = 1;
188
-        //}
189
-    },
190
-
191 173
     changeLocalVideo (stream) {
192 174
         let localId = APP.conference.getMyUserId();
193 175
         this.onVideoTypeChanged(localId, stream.videoType);

Laden…
Annuleren
Opslaan