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.
This commit is contained in:
Leonard Kim 2017-06-30 13:02:51 -07:00 committed by yanas
parent ec22329408
commit 16fbf90a00
3 changed files with 2 additions and 23 deletions

View File

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

View File

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

View File

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