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

This commit is contained in:
Philipp Hancke 2014-02-26 18:18:08 +01:00
parent 8ebe2d9468
commit 472a532cc7
1 changed files with 9 additions and 1 deletions

10
app.js
View File

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