|
@@ -9,6 +9,7 @@ var sharedKey = '';
|
9
|
9
|
var roomUrl = null;
|
10
|
10
|
var ssrc2jid = {};
|
11
|
11
|
var localVideoSrc = null;
|
|
12
|
+var preziPlayer = null;
|
12
|
13
|
|
13
|
14
|
/* window.onbeforeunload = closePageWarning; */
|
14
|
15
|
|
|
@@ -140,16 +141,14 @@ $(document).bind('remotestreamadded.jingle', function (event, data, sid) {
|
140
|
141
|
|
141
|
142
|
var container;
|
142
|
143
|
var remotes = document.getElementById('remoteVideos');
|
|
144
|
+
|
143
|
145
|
if (data.peerjid) {
|
144
|
146
|
container = document.getElementById('participant_' + Strophe.getResourceFromJid(data.peerjid));
|
145
|
147
|
if (!container) {
|
146
|
148
|
console.warn('no container for', data.peerjid);
|
147
|
149
|
// create for now...
|
148
|
150
|
// FIXME: should be removed
|
149
|
|
- container = document.createElement('span');
|
150
|
|
- container.id = 'participant_' + Strophe.getResourceFromJid(data.peerjid);
|
151
|
|
- container.className = 'videocontainer';
|
152
|
|
- remotes.appendChild(container);
|
|
151
|
+ container = addRemoteVideoContainer('participant_' + Strophe.getResourceFromJid(data.peerjid));
|
153
|
152
|
} else {
|
154
|
153
|
//console.log('found container for', data.peerjid);
|
155
|
154
|
}
|
|
@@ -173,6 +172,7 @@ $(document).bind('remotestreamadded.jingle', function (event, data, sid) {
|
173
|
172
|
container.id = 'mixedstream';
|
174
|
173
|
$(container).hide();
|
175
|
174
|
}
|
|
175
|
+
|
176
|
176
|
var sel = $('#' + id);
|
177
|
177
|
sel.hide();
|
178
|
178
|
RTC.attachMediaStream(sel, data.stream);
|
|
@@ -187,10 +187,12 @@ $(document).bind('remotestreamadded.jingle', function (event, data, sid) {
|
187
|
187
|
var pick = $('#remoteVideos>span[id!="mixedstream"]:visible:last>video').get(0);
|
188
|
188
|
// mute if localvideo
|
189
|
189
|
var isLocalVideo = false;
|
190
|
|
- if (pick.src === localVideoSrc)
|
|
190
|
+ if (pick) {
|
|
191
|
+ if (pick.src === localVideoSrc)
|
191
|
192
|
isLocalVideo = true;
|
192
|
|
-
|
193
|
|
- updateLargeVideo(pick.src, isLocalVideo, pick.volume);
|
|
193
|
+
|
|
194
|
+ updateLargeVideo(pick.src, isLocalVideo, pick.volume);
|
|
195
|
+ }
|
194
|
196
|
}
|
195
|
197
|
$('#' + id).parent().remove();
|
196
|
198
|
resizeThumbnails();
|
|
@@ -217,7 +219,7 @@ $(document).bind('callactive.jingle', function (event, videoelem, sid) {
|
217
|
219
|
resizeThumbnails();
|
218
|
220
|
|
219
|
221
|
updateLargeVideo(videoelem.attr('src'), false, 1);
|
220
|
|
-
|
|
222
|
+
|
221
|
223
|
showFocusIndicator();
|
222
|
224
|
}
|
223
|
225
|
});
|
|
@@ -238,16 +240,13 @@ $(document).bind('setLocalDescription.jingle', function (event, sid) {
|
238
|
240
|
newssrcs[type] = ssrc;
|
239
|
241
|
});
|
240
|
242
|
console.log('new ssrcs', newssrcs);
|
241
|
|
- // just blast off presence for everything -- TODO: optimize
|
242
|
|
- var pres = $pres({to: connection.emuc.myroomjid });
|
243
|
|
- pres.c('x', {xmlns: 'http://jabber.org/protocol/muc'}).up();
|
244
|
243
|
|
245
|
|
- pres.c('media', {xmlns: 'http://estos.de/ns/mjs'});
|
|
244
|
+ var i = 0;
|
246
|
245
|
Object.keys(newssrcs).forEach(function (mtype) {
|
247
|
|
- pres.c('source', {type: mtype, ssrc: newssrcs[mtype]}).up();
|
|
246
|
+ i++;
|
|
247
|
+ connection.emuc.addMediaToPresence(i, mtype, newssrcs[mtype]);
|
248
|
248
|
});
|
249
|
|
- pres.up();
|
250
|
|
- connection.send(pres);
|
|
249
|
+ connection.emuc.sendPresence();
|
251
|
250
|
});
|
252
|
251
|
|
253
|
252
|
$(document).bind('joined.muc', function (event, jid, info) {
|
|
@@ -256,22 +255,19 @@ $(document).bind('joined.muc', function (event, jid, info) {
|
256
|
255
|
document.createTextNode(Strophe.getResourceFromJid(jid) + ' (you)')
|
257
|
256
|
);
|
258
|
257
|
|
259
|
|
- // Once we've joined the muc show the toolbar
|
260
|
|
- showToolbar();
|
261
|
|
-
|
262
|
258
|
if (Object.keys(connection.emuc.members).length < 1) {
|
263
|
259
|
focus = new ColibriFocus(connection, config.hosts.bridge);
|
264
|
260
|
}
|
|
261
|
+
|
|
262
|
+ // Once we've joined the muc show the toolbar
|
|
263
|
+ showToolbar();
|
265
|
264
|
});
|
266
|
265
|
|
267
|
266
|
$(document).bind('entered.muc', function (event, jid, info, pres) {
|
268
|
267
|
console.log('entered', jid, info);
|
269
|
268
|
console.log(focus);
|
270
|
|
- var container = document.createElement('span');
|
271
|
|
- container.id = 'participant_' + Strophe.getResourceFromJid(jid);
|
272
|
|
- container.className = 'videocontainer';
|
273
|
|
- var remotes = document.getElementById('remoteVideos');
|
274
|
|
- remotes.appendChild(container);
|
|
269
|
+
|
|
270
|
+ var container = addRemoteVideoContainer('participant_' + Strophe.getResourceFromJid(jid));
|
275
|
271
|
|
276
|
272
|
var nickfield = document.createElement('span');
|
277
|
273
|
nickfield.appendChild(document.createTextNode(Strophe.getResourceFromJid(jid)));
|
|
@@ -304,7 +300,7 @@ $(document).bind('left.muc', function (event, jid) {
|
304
|
300
|
var container = document.getElementById('participant_' + Strophe.getResourceFromJid(jid));
|
305
|
301
|
if (container) {
|
306
|
302
|
// hide here, wait for video to close before removing
|
307
|
|
- $(container).hide();
|
|
303
|
+ $(container).hide();
|
308
|
304
|
resizeThumbnails();
|
309
|
305
|
}
|
310
|
306
|
|
|
@@ -319,6 +315,10 @@ $(document).bind('left.muc', function (event, jid) {
|
319
|
315
|
focus = new ColibriFocus(connection, config.hosts.bridge);
|
320
|
316
|
}
|
321
|
317
|
}
|
|
318
|
+
|
|
319
|
+ if (connection.emuc.getPrezi(jid)) {
|
|
320
|
+ $(document).trigger('presentationremoved.muc', [jid, connection.emuc.getPrezi(jid)]);
|
|
321
|
+ }
|
322
|
322
|
});
|
323
|
323
|
|
324
|
324
|
$(document).bind('presence.muc', function (event, jid, info, pres) {
|
|
@@ -355,11 +355,156 @@ $(document).bind('passwordrequired.muc', function (event, jid) {
|
355
|
355
|
});
|
356
|
356
|
});
|
357
|
357
|
|
|
358
|
+/*
|
|
359
|
+ * Presentation has been removed.
|
|
360
|
+ */
|
|
361
|
+$(document).bind('presentationremoved.muc', function(event, jid, presUrl) {
|
|
362
|
+ console.log('presentation removed', presUrl);
|
|
363
|
+ var presId = getPresentationId(presUrl);
|
|
364
|
+ setPresentationVisible(false);
|
|
365
|
+ $('#participant_' + Strophe.getResourceFromJid(jid) + '_' + presId).remove();
|
|
366
|
+ $('#presentation>iframe').remove();
|
|
367
|
+ if (preziPlayer != null) {
|
|
368
|
+ preziPlayer.destroy();
|
|
369
|
+ preziPlayer = null;
|
|
370
|
+ }
|
|
371
|
+});
|
|
372
|
+
|
|
373
|
+/*
|
|
374
|
+ * Presentation has been added.
|
|
375
|
+ */
|
|
376
|
+$(document).bind('presentationadded.muc', function (event, jid, presUrl, currentSlide) {
|
|
377
|
+ console.log("presentation added", presUrl);
|
|
378
|
+
|
|
379
|
+ var presId = getPresentationId(presUrl);
|
|
380
|
+ var elementId = 'participant_' + Strophe.getResourceFromJid(jid) + '_' + presId;
|
|
381
|
+
|
|
382
|
+ var container = addRemoteVideoContainer(elementId);
|
|
383
|
+ resizeThumbnails();
|
|
384
|
+
|
|
385
|
+ var controlsEnabled = false;
|
|
386
|
+ if (jid === connection.emuc.myroomjid)
|
|
387
|
+ controlsEnabled = true;
|
|
388
|
+
|
|
389
|
+ setPresentationVisible(true);
|
|
390
|
+ $('#largeVideoContainer').hover(
|
|
391
|
+ function (event) {
|
|
392
|
+ if ($('#largeVideo').css('visibility') == 'hidden')
|
|
393
|
+ $('#reloadPresentation').css({display:'inline-block'});
|
|
394
|
+ },
|
|
395
|
+ function (event) {
|
|
396
|
+ if ($('#largeVideo').css('visibility') == 'visible')
|
|
397
|
+ $('#reloadPresentation').css({display:'none'});
|
|
398
|
+ else {
|
|
399
|
+ var e = event.toElement || event.relatedTarget;
|
|
400
|
+
|
|
401
|
+ while(e && e.parentNode && e.parentNode != window) {
|
|
402
|
+ if (e.parentNode == this || e == this) {
|
|
403
|
+ return false;
|
|
404
|
+ }
|
|
405
|
+ e = e.parentNode;
|
|
406
|
+ }
|
|
407
|
+ $('#reloadPresentation').css({display:'none'});
|
|
408
|
+ }
|
|
409
|
+ });
|
|
410
|
+
|
|
411
|
+ preziPlayer = new PreziPlayer(
|
|
412
|
+ 'presentation',
|
|
413
|
+ {preziId: presId,
|
|
414
|
+ width: $('#largeVideoContainer').width(),
|
|
415
|
+ height: $('#largeVideoContainer').height(),
|
|
416
|
+ controls: controlsEnabled,
|
|
417
|
+ debug: true
|
|
418
|
+ });
|
|
419
|
+
|
|
420
|
+ $('#presentation>iframe').attr('id', preziPlayer.options.preziId);
|
|
421
|
+
|
|
422
|
+// $('#presentation>iframe').load(function (){
|
|
423
|
+// console.log("IFRAME LOADED!!!!!!!!!!!!!!!!");
|
|
424
|
+// });
|
|
425
|
+// $('#presentation>iframe').ready(function (){
|
|
426
|
+// console.log("IFRAME READY!!!!!!!!!!!!!!!!");
|
|
427
|
+// });
|
|
428
|
+
|
|
429
|
+ preziPlayer.on(PreziPlayer.EVENT_STATUS, function(event) {
|
|
430
|
+ console.log("prezi status", event.value);
|
|
431
|
+ if (event.value == PreziPlayer.STATUS_CONTENT_READY) {
|
|
432
|
+ if (jid != connection.emuc.myroomjid)
|
|
433
|
+ preziPlayer.flyToStep(currentSlide);
|
|
434
|
+ }
|
|
435
|
+ });
|
|
436
|
+
|
|
437
|
+ preziPlayer.on(PreziPlayer.EVENT_CURRENT_STEP, function(event) {
|
|
438
|
+ console.log("event value", event.value);
|
|
439
|
+ connection.emuc.addCurrentSlideToPresence(event.value);
|
|
440
|
+ connection.emuc.sendPresence();
|
|
441
|
+ });
|
|
442
|
+
|
|
443
|
+ $("#" + elementId).css('background-image','url(../images/avatarprezi.png)');
|
|
444
|
+ $("#" + elementId).click(
|
|
445
|
+ function () {
|
|
446
|
+ setPresentationVisible(true);
|
|
447
|
+ }
|
|
448
|
+ );
|
|
449
|
+});
|
|
450
|
+
|
|
451
|
+/*
|
|
452
|
+ * Indicates presentation slide change.
|
|
453
|
+ */
|
|
454
|
+$(document).bind('gotoslide.muc', function (event, jid, presUrl, current) {
|
|
455
|
+ if (preziPlayer) {
|
|
456
|
+ preziPlayer.flyToStep(current);
|
|
457
|
+ }
|
|
458
|
+});
|
|
459
|
+
|
|
460
|
+/**
|
|
461
|
+ * Returns the presentation id from the given url.
|
|
462
|
+ */
|
|
463
|
+function getPresentationId (presUrl) {
|
|
464
|
+ var presIdTmp = presUrl.substring(presUrl.indexOf("prezi.com/") + 10);
|
|
465
|
+ return presIdTmp.substring(0, presIdTmp.indexOf('/'));
|
|
466
|
+}
|
|
467
|
+
|
|
468
|
+/*
|
|
469
|
+ * Reloads the current presentation.
|
|
470
|
+ */
|
|
471
|
+function reloadPresentation() {
|
|
472
|
+ var iframe = document.getElementById(preziPlayer.options.preziId);
|
|
473
|
+ iframe.src = iframe.src;
|
|
474
|
+}
|
|
475
|
+
|
|
476
|
+/*
|
|
477
|
+ * Shows/hides a presentation.
|
|
478
|
+ */
|
|
479
|
+function setPresentationVisible(visible) {
|
|
480
|
+ if (visible) {
|
|
481
|
+ $('#largeVideo').fadeOut(300, function () {
|
|
482
|
+ $('#largeVideo').css({visibility:'hidden'});
|
|
483
|
+ $('#presentation>iframe').fadeIn(300, function() {
|
|
484
|
+ $('#presentation>iframe').css({opacity:'1'});
|
|
485
|
+ });
|
|
486
|
+ });
|
|
487
|
+ }
|
|
488
|
+ else {
|
|
489
|
+ if ($('#presentation>iframe')) {
|
|
490
|
+ $('#presentation>iframe').fadeOut(300, function () {
|
|
491
|
+ $('#presentation>iframe').css({opacity:'0'});
|
|
492
|
+ $('#largeVideo').fadeIn(300, function() {
|
|
493
|
+ $('#largeVideo').css({visibility:'visible'});
|
|
494
|
+ });
|
|
495
|
+ });
|
|
496
|
+ }
|
|
497
|
+ }
|
|
498
|
+}
|
|
499
|
+
|
358
|
500
|
/**
|
359
|
501
|
* Updates the large video with the given new video source.
|
360
|
502
|
*/
|
361
|
503
|
function updateLargeVideo(newSrc, localVideo, vol) {
|
362
|
504
|
console.log('hover in', newSrc);
|
|
505
|
+
|
|
506
|
+ setPresentationVisible(false);
|
|
507
|
+
|
363
|
508
|
if ($('#largeVideo').attr('src') != newSrc) {
|
364
|
509
|
|
365
|
510
|
document.getElementById('largeVideo').volume = vol;
|
|
@@ -413,6 +558,9 @@ function resizeLarge() {
|
413
|
558
|
if (availableWidth < 0 || availableHeight < 0) return;
|
414
|
559
|
$('#largeVideo').parent().width(availableWidth);
|
415
|
560
|
$('#largeVideo').parent().height(availableWidth / aspectRatio);
|
|
561
|
+ $('#presentation>iframe').width(availableWidth);
|
|
562
|
+ $('#presentation>iframe').height(availableWidth / aspectRatio);
|
|
563
|
+
|
416
|
564
|
resizeThumbnails();
|
417
|
565
|
}
|
418
|
566
|
|
|
@@ -466,6 +614,9 @@ $(document).ready(function () {
|
466
|
614
|
|
467
|
615
|
$('#usermsg').autosize();
|
468
|
616
|
|
|
617
|
+ // Set the defaults for prompt dialogs.
|
|
618
|
+ jQuery.prompt.setDefaults({persistent: false});
|
|
619
|
+
|
469
|
620
|
resizeLarge();
|
470
|
621
|
$(window).resize(function () {
|
471
|
622
|
resizeLarge();
|
|
@@ -513,15 +664,8 @@ function dump(elem, filename){
|
513
|
664
|
var session = connection.jingle.sessions[sid];
|
514
|
665
|
if (session.peerconnection && session.peerconnection.updateLog) {
|
515
|
666
|
// FIXME: should probably be a .dump call
|
516
|
|
- /* well, if I need to modify the output format anyway...
|
517
|
|
- var stats = JSON.parse(JSON.stringify(session.peerconnection.stats));
|
518
|
|
- Object.keys(stats).forEach(function (name) {
|
519
|
|
- stats[name].values = JSON.stringify(stats[name].values);
|
520
|
|
- });
|
521
|
|
- */
|
522
|
667
|
data["jingle_" + session.sid] = {
|
523
|
668
|
updateLog: session.peerconnection.updateLog,
|
524
|
|
- stats: session.peerconnection.stats,
|
525
|
669
|
url: window.location.href}
|
526
|
670
|
;
|
527
|
671
|
}
|
|
@@ -609,16 +753,16 @@ function openLockDialog() {
|
609
|
753
|
submit: function(e,v,m,f){
|
610
|
754
|
if(v)
|
611
|
755
|
{
|
612
|
|
- var lockKey = document.getElementById('lockKey');
|
|
756
|
+ var lockKey = document.getElementById('lockKey');
|
613
|
757
|
|
614
|
|
- if (lockKey.value)
|
615
|
|
- {
|
616
|
|
- setSharedKey(lockKey.value);
|
617
|
|
- lockRoom(true);
|
|
758
|
+ if (lockKey.value)
|
|
759
|
+ {
|
|
760
|
+ setSharedKey(lockKey.value);
|
|
761
|
+ lockRoom(true);
|
|
762
|
+ }
|
618
|
763
|
}
|
619
|
764
|
}
|
620
|
|
- }
|
621
|
|
- });
|
|
765
|
+ });
|
622
|
766
|
}
|
623
|
767
|
}
|
624
|
768
|
|
|
@@ -637,11 +781,149 @@ function openLinkDialog() {
|
637
|
781
|
});
|
638
|
782
|
}
|
639
|
783
|
|
|
784
|
+/*
|
|
785
|
+ * Opens the settings dialog.
|
|
786
|
+ */
|
|
787
|
+function openSettingsDialog() {
|
|
788
|
+ $.prompt('<h2>Configure your conference</h2>' +
|
|
789
|
+ '<input type="checkbox" id="initMuted"> Participants join muted<br/>' +
|
|
790
|
+ '<input type="checkbox" id="requireNicknames"> Require nicknames<br/><br/>' +
|
|
791
|
+ 'Set a secrect key to lock your room: <input id="lockKey" type="text" placeholder="your shared key" autofocus>',
|
|
792
|
+ {
|
|
793
|
+ persistent: false,
|
|
794
|
+ buttons: { "Save": true , "Cancel": false},
|
|
795
|
+ defaultButton: 1,
|
|
796
|
+ loaded: function(event) {
|
|
797
|
+ document.getElementById('lockKey').focus();
|
|
798
|
+ },
|
|
799
|
+ submit: function(e,v,m,f){
|
|
800
|
+ if(v)
|
|
801
|
+ {
|
|
802
|
+ if ($('#initMuted').is(":checked"))
|
|
803
|
+ {
|
|
804
|
+ // it is checked
|
|
805
|
+ }
|
|
806
|
+
|
|
807
|
+ if ($('#requireNicknames').is(":checked"))
|
|
808
|
+ {
|
|
809
|
+ // it is checked
|
|
810
|
+ }
|
|
811
|
+ /*
|
|
812
|
+ var lockKey = document.getElementById('lockKey');
|
|
813
|
+
|
|
814
|
+ if (lockKey.value)
|
|
815
|
+ {
|
|
816
|
+ setSharedKey(lockKey.value);
|
|
817
|
+ lockRoom(true);
|
|
818
|
+ }
|
|
819
|
+ */
|
|
820
|
+ }
|
|
821
|
+ }
|
|
822
|
+ });
|
|
823
|
+}
|
|
824
|
+
|
|
825
|
+/*
|
|
826
|
+ * Opens the Prezi dialog, from which the user could choose a presentation to load.
|
|
827
|
+ */
|
|
828
|
+function openPreziDialog() {
|
|
829
|
+ var myprezi = connection.emuc.getPrezi(connection.emuc.myroomjid);
|
|
830
|
+ if (myprezi) {
|
|
831
|
+ $.prompt("Are you sure you would like to remove your Prezi?",
|
|
832
|
+ {
|
|
833
|
+ title: "Remove Prezi",
|
|
834
|
+ buttons: { "Remove": true, "Cancel": false},
|
|
835
|
+ defaultButton: 1,
|
|
836
|
+ submit: function(e,v,m,f){
|
|
837
|
+ if(v)
|
|
838
|
+ {
|
|
839
|
+ connection.emuc.removePreziFromPresence();
|
|
840
|
+ connection.emuc.sendPresence();
|
|
841
|
+ }
|
|
842
|
+ }
|
|
843
|
+ });
|
|
844
|
+ }
|
|
845
|
+ else if (preziPlayer != null) {
|
|
846
|
+ $.prompt("Another participant is already sharing a Prezi. This conference allows only one Prezi at a time.",
|
|
847
|
+ {
|
|
848
|
+ title: "Share a Prezi",
|
|
849
|
+ buttons: { "Ok": true},
|
|
850
|
+ defaultButton: 0,
|
|
851
|
+ submit: function(e,v,m,f){
|
|
852
|
+ $.prompt.close();
|
|
853
|
+ }
|
|
854
|
+ });
|
|
855
|
+ }
|
|
856
|
+ else {
|
|
857
|
+ var openPreziState = {
|
|
858
|
+ state0: {
|
|
859
|
+ html: '<h2>Share a Prezi</h2>' +
|
|
860
|
+ '<input id="preziUrl" type="text" placeholder="e.g. http://prezi.com/wz7vhjycl7e6/my-prezi" autofocus>',
|
|
861
|
+ persistent: false,
|
|
862
|
+ buttons: { "Share": true , "Cancel": false},
|
|
863
|
+ defaultButton: 1,
|
|
864
|
+ submit: function(e,v,m,f){
|
|
865
|
+ e.preventDefault();
|
|
866
|
+ if(v)
|
|
867
|
+ {
|
|
868
|
+ var preziUrl = document.getElementById('preziUrl');
|
|
869
|
+
|
|
870
|
+ if (preziUrl.value)
|
|
871
|
+ {
|
|
872
|
+ if (preziUrl.value.indexOf('http://prezi.com/') != 0
|
|
873
|
+ && preziUrl.value.indexOf('https://prezi.com/') != 0)
|
|
874
|
+ {
|
|
875
|
+ $.prompt.goToState('state1');
|
|
876
|
+ return false;
|
|
877
|
+ }
|
|
878
|
+ else {
|
|
879
|
+ var presIdTmp = preziUrl.value.substring(preziUrl.value.indexOf("prezi.com/") + 10);
|
|
880
|
+ if (presIdTmp.indexOf('/') < 2) {
|
|
881
|
+ $.prompt.goToState('state1');
|
|
882
|
+ return false;
|
|
883
|
+ }
|
|
884
|
+ else {
|
|
885
|
+ connection.emuc.addPreziToPresence(preziUrl.value, 0);
|
|
886
|
+ connection.emuc.sendPresence();
|
|
887
|
+ $.prompt.close();
|
|
888
|
+ }
|
|
889
|
+ }
|
|
890
|
+ }
|
|
891
|
+ }
|
|
892
|
+ else
|
|
893
|
+ $.prompt.close();
|
|
894
|
+ }
|
|
895
|
+ },
|
|
896
|
+ state1: {
|
|
897
|
+ html: '<h2>Share a Prezi</h2>' +
|
|
898
|
+ 'Please provide a correct prezi link.',
|
|
899
|
+ persistent: false,
|
|
900
|
+ buttons: { "Back": true, "Cancel": false },
|
|
901
|
+ defaultButton: 1,
|
|
902
|
+ submit:function(e,v,m,f) {
|
|
903
|
+ e.preventDefault();
|
|
904
|
+ if(v==0)
|
|
905
|
+ $.prompt.close();
|
|
906
|
+ else
|
|
907
|
+ $.prompt.goToState('state0');
|
|
908
|
+ }
|
|
909
|
+ }
|
|
910
|
+ };
|
|
911
|
+
|
|
912
|
+ var myPrompt = jQuery.prompt(openPreziState);
|
|
913
|
+
|
|
914
|
+ myPrompt.on('impromptu:loaded', function(e) {
|
|
915
|
+ document.getElementById('preziUrl').focus();
|
|
916
|
+ });
|
|
917
|
+ myPrompt.on('impromptu:statechanged', function(e) {
|
|
918
|
+ document.getElementById('preziUrl').focus();
|
|
919
|
+ });
|
|
920
|
+ }
|
|
921
|
+}
|
|
922
|
+
|
640
|
923
|
/*
|
641
|
924
|
* Locks / unlocks the room.
|
642
|
925
|
*/
|
643
|
926
|
function lockRoom(lock) {
|
644
|
|
- console.log("LOCK", sharedKey);
|
645
|
927
|
if (lock)
|
646
|
928
|
connection.emuc.lockRoom(sharedKey);
|
647
|
929
|
else
|
|
@@ -695,6 +977,11 @@ function openChat() {
|
695
|
977
|
*/
|
696
|
978
|
function showToolbar() {
|
697
|
979
|
$('#toolbar').css({visibility:"visible"});
|
|
980
|
+ if (focus != null)
|
|
981
|
+ {
|
|
982
|
+// TODO: Enable settings functionality. Need to uncomment the settings button in index.html.
|
|
983
|
+// $('#settingsButton').css({visibility:"visible"});
|
|
984
|
+ }
|
698
|
985
|
}
|
699
|
986
|
|
700
|
987
|
/*
|
|
@@ -745,6 +1032,15 @@ function showFocusIndicator() {
|
745
|
1032
|
}
|
746
|
1033
|
}
|
747
|
1034
|
|
|
1035
|
+function addRemoteVideoContainer(id) {
|
|
1036
|
+ var container = document.createElement('span');
|
|
1037
|
+ container.id = id;
|
|
1038
|
+ container.className = 'videocontainer';
|
|
1039
|
+ var remotes = document.getElementById('remoteVideos');
|
|
1040
|
+ remotes.appendChild(container);
|
|
1041
|
+ return container;
|
|
1042
|
+}
|
|
1043
|
+
|
748
|
1044
|
/*
|
749
|
1045
|
* Creates the element indicating the focus of the conference.
|
750
|
1046
|
*/
|