Преглед изворни кода

hide participants if they go recvonly, almost done with issue #41

j8
Philipp Hancke пре 12 година
родитељ
комит
472a532cc7
1 измењених фајлова са 9 додато и 1 уклоњено
  1. 9
    1
      app.js

+ 9
- 1
app.js Прегледај датотеку

@@ -489,7 +489,15 @@ $(document).bind('presence.muc', function (event, jid, info, pres) {
489 489
 
490 490
         // might need to update the direction if participant just went from sendrecv to recvonly
491 491
         if (ssrc.getAttribute('type') == 'video') {
492
-            console.warn('video direction for', jid, ssrc.getAttribute('direction'));
492
+            var el = $('#participant_'  + Strophe.getResourceFromJid(jid) + '>video');
493
+            switch(ssrc.getAttribute('direction')) {
494
+            case 'sendrecv':
495
+                el.show(); 
496
+                break;
497
+            case 'recvonly':
498
+                el.hide();
499
+                break;
500
+            }
493 501
         }
494 502
     });
495 503
 

Loading…
Откажи
Сачувај