Browse Source

Merge pull request #23 from damencho/fix-undefined-getResourceBySSRC

Fixes undefined error in getResourceBySSRC
dev1
Paweł Domas 10 years ago
parent
commit
79a411ed2c
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      modules/RTC/RTC.js

+ 2
- 2
modules/RTC/RTC.js View File

@@ -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…
Cancel
Save