Selaa lähdekoodia

Fixes undefined error in getResourceBySSRC when local video or audio track is stopped, reported to happen sometimes with desktop sharing.

dev1
damencho 10 vuotta sitten
vanhempi
commit
352de0b818
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2
    2
      modules/RTC/RTC.js

+ 2
- 2
modules/RTC/RTC.js Näytä tiedosto

@@ -319,8 +319,8 @@ RTC.prototype.setAudioLevel = function (resource, audioLevel) {
319 319
  * @param ssrc the ssrc to check.
320 320
  */
321 321
 RTC.prototype.getResourceBySSRC = function (ssrc) {
322
-    if(ssrc == this.localVideo.getSSRC()
323
-        || ssrc == this.localAudio.getSSRC()) {
322
+    if((this.localVideo && ssrc == this.localVideo.getSSRC())
323
+        || (this.localAudio && ssrc == this.localAudio.getSSRC())) {
324 324
         return Strophe.getResourceFromJid(this.room.myroomjid);
325 325
     }
326 326
 

Loading…
Peruuta
Tallenna