|
@@ -295,8 +295,7 @@ function handleVideoThumbClicked(videoSrc) {
|
295
|
295
|
updateLargeVideo(videoSrc, 1);
|
296
|
296
|
|
297
|
297
|
$('audio').each(function (idx, el) {
|
298
|
|
- // We no longer mix so we check for local audio now
|
299
|
|
- if(el.id != 'localAudio') {
|
|
298
|
+ if (el.id.indexOf('mixedmslabel') !== -1) {
|
300
|
299
|
el.volume = 0;
|
301
|
300
|
el.volume = 1;
|
302
|
301
|
}
|
|
@@ -450,8 +449,6 @@ $(document).bind('callactive.jingle', function (event, videoelem, sid) {
|
450
|
449
|
|
451
|
450
|
$(document).bind('callterminated.jingle', function (event, sid, reason) {
|
452
|
451
|
// FIXME
|
453
|
|
- focus = null;
|
454
|
|
- activecall = null;
|
455
|
452
|
});
|
456
|
453
|
|
457
|
454
|
$(document).bind('setLocalDescription.jingle', function (event, sid) {
|
|
@@ -575,14 +572,10 @@ $(document).bind('left.muc', function (event, jid) {
|
575
|
572
|
}
|
576
|
573
|
else if (focus && Object.keys(connection.emuc.members).length === 0) {
|
577
|
574
|
console.log('everyone left');
|
578
|
|
- if (focus !== null) {
|
579
|
|
- // FIXME: closing the connection is a hack to avoid some
|
580
|
|
- // problemswith reinit
|
581
|
|
- if (focus.peerconnection !== null) {
|
582
|
|
- focus.peerconnection.close();
|
583
|
|
- }
|
584
|
|
- focus = new ColibriFocus(connection, config.hosts.bridge);
|
585
|
|
- }
|
|
575
|
+ // FIXME: closing the connection is a hack to avoid some
|
|
576
|
+ // problemswith reinit
|
|
577
|
+ disposeConference();
|
|
578
|
+ focus = new ColibriFocus(connection, config.hosts.bridge);
|
586
|
579
|
}
|
587
|
580
|
if (connection.emuc.getPrezi(jid)) {
|
588
|
581
|
$(document).trigger('presentationremoved.muc', [jid, connection.emuc.getPrezi(jid)]);
|
|
@@ -967,8 +960,24 @@ $(window).bind('beforeunload', function () {
|
967
|
960
|
}
|
968
|
961
|
});
|
969
|
962
|
}
|
|
963
|
+ disposeConference();
|
970
|
964
|
});
|
971
|
965
|
|
|
966
|
+function disposeConference() {
|
|
967
|
+ var handler = getConferenceHandler();
|
|
968
|
+ if(handler) {
|
|
969
|
+ if(connection.jingle.localAudio) {
|
|
970
|
+ handler.peerconnection.removeStream(connection.jingle.localAudio);
|
|
971
|
+ }
|
|
972
|
+ if(connection.jingle.localVideo) {
|
|
973
|
+ handler.peerconnection.removeStream(connection.jingle.localVideo);
|
|
974
|
+ }
|
|
975
|
+ handler.peerconnection.close();
|
|
976
|
+ }
|
|
977
|
+ focus = null;
|
|
978
|
+ activecall = null;
|
|
979
|
+}
|
|
980
|
+
|
972
|
981
|
function dump(elem, filename){
|
973
|
982
|
elem = elem.parentNode;
|
974
|
983
|
elem.download = filename || 'meetlog.json';
|