|
@@ -317,6 +317,31 @@ $(document).bind('presence.muc', function (event, jid, info, pres) {
|
317
|
317
|
//console.log(jid, 'assoc ssrc', ssrc.getAttribute('type'), ssrc.getAttribute('ssrc'));
|
318
|
318
|
ssrc2jid[ssrc.getAttribute('ssrc')] = jid;
|
319
|
319
|
});
|
|
320
|
+$(document).bind('passwordrequired.muc', function (event, jid) {
|
|
321
|
+ console.log('on password required', jid);
|
|
322
|
+
|
|
323
|
+ $.prompt('<h2>Password required</h2>' +
|
|
324
|
+ '<input id="lockKey" type="text" placeholder="shared key" autofocus>',
|
|
325
|
+ {
|
|
326
|
+ persistent: true,
|
|
327
|
+ buttons: { "Ok": true , "Cancel": false},
|
|
328
|
+ defaultButton: 1,
|
|
329
|
+ loaded: function(event) {
|
|
330
|
+ document.getElementById('lockKey').focus();
|
|
331
|
+ },
|
|
332
|
+ submit: function(e,v,m,f){
|
|
333
|
+ if(v)
|
|
334
|
+ {
|
|
335
|
+ var lockKey = document.getElementById('lockKey');
|
|
336
|
+
|
|
337
|
+ if (lockKey.value != null)
|
|
338
|
+ {
|
|
339
|
+ setSharedKey(lockKey);
|
|
340
|
+ connection.emuc.doJoin(jid, lockKey.value);
|
|
341
|
+ }
|
|
342
|
+ }
|
|
343
|
+ }
|
|
344
|
+ });
|
320
|
345
|
});
|
321
|
346
|
|
322
|
347
|
function toggleVideo() {
|