Fix local audio and video not disabled when not available

When the streams are initialized and there is no audio or no video the
"audio/videoNotFound" flag is set. This flag prevents the audio or video
from being enabled later, and it is also used to discard calls to
"disableAudio/Video", as there would be no need to disable them if they
were not found. However, in that last case, it is necessary to
explicitly disable them before the flag is set.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2018-06-03 21:36:27 +02:00
Родитель 9bf78d6b9a
Коммит 1b2a838ec3
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -971,10 +971,12 @@ var spreedPeerConnectionTable = [];
}
if (!OCA.SpreedMe.webrtc.webrtc.isAudioEnabled()) {
app.disableAudio();
app.hasNoAudio();
}
if (!OCA.SpreedMe.webrtc.webrtc.isVideoEnabled()) {
app.disableVideo();
app.hasNoVideo();
}
});