diff --git a/index.html b/index.html index a13fc9346..2c589967c 100644 --- a/index.html +++ b/index.html @@ -19,7 +19,7 @@ - + diff --git a/libs/app.bundle.js b/libs/app.bundle.js index 68636e507..89f6de8e2 100644 --- a/libs/app.bundle.js +++ b/libs/app.bundle.js @@ -7119,6 +7119,13 @@ function getCameraVideoSize(videoWidth, * Sets the display name for the given video span id. */ function setDisplayName(videoSpanId, displayName, key) { + + if (!$('#' + videoSpanId).length) { + console.warn( + "Unable to set displayName - " + videoSpanId + " does not exist"); + return; + } + var nameSpan = $('#' + videoSpanId + '>span.displayname'); var defaultLocalDisplayName = APP.translation.generateTranslatonHTML( interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME); @@ -7569,17 +7576,15 @@ var VideoLayout = (function (my) { var myResourceJid = APP.xmpp.myResource(); - VideoLayout.updateLargeVideo(localVideoSrc, 0, - myResourceJid); + VideoLayout.updateLargeVideo(localVideoSrc, 0, myResourceJid); }; my.mucJoined = function () { var myResourceJid = APP.xmpp.myResource(); - if(!largeVideoState.userResourceJid) - VideoLayout.updateLargeVideo(localVideoSrc, 0, - myResourceJid, true); + if (!largeVideoState.userResourceJid) + VideoLayout.updateLargeVideo(localVideoSrc, 0, myResourceJid, true); }; /** @@ -8815,8 +8820,7 @@ var VideoLayout = (function (my) { */ my.onDominantSpeakerChanged = function (resourceJid) { // We ignore local user events. - if (resourceJid - === APP.xmpp.myResource()) + if (resourceJid === APP.xmpp.myResource()) return; var members = APP.xmpp.getMembers(); @@ -8852,8 +8856,10 @@ var VideoLayout = (function (my) { // Update the large video if the video source is already available, // otherwise wait for the "videoactive.jingle" event. - if (video.length && video[0].currentTime > 0) - VideoLayout.updateLargeVideo(APP.RTC.getVideoSrc(video[0]), resourceJid); + if (video.length && video[0].currentTime > 0) { + VideoLayout.updateLargeVideo( + APP.RTC.getVideoSrc(video[0]), 1, resourceJid); + } } }; @@ -8998,7 +9004,7 @@ var VideoLayout = (function (my) { continue; // videoSrcToSsrc needs to be update for this call to succeed. - VideoLayout.updateLargeVideo(src); + VideoLayout.updateLargeVideo(src, 1, resource); break; } @@ -9215,7 +9221,8 @@ var VideoLayout = (function (my) { my.participantLeft = function (jid) { // Unlock large video - if (focusedVideoInfo && focusedVideoInfo.jid === jid) + var resourceJid = Strophe.getResourceFromJid(jid); + if (focusedVideoInfo && focusedVideoInfo.resourceJid === resourceJid) { console.info("Focused video owner has left the conference"); focusedVideoInfo = null; @@ -16945,6 +16952,7 @@ module.exports = function(XMPP, eventEmitter) this.connection.disco.addFeature('urn:xmpp:jingle:1'); this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:1'); this.connection.disco.addFeature('urn:xmpp:jingle:transports:ice-udp:1'); + this.connection.disco.addFeature('urn:xmpp:jingle:apps:dtls:0'); this.connection.disco.addFeature('urn:xmpp:jingle:transports:dtls-sctp:1'); this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:audio'); this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:video'); diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js index d89da0c15..e34217814 100644 --- a/modules/UI/videolayout/VideoLayout.js +++ b/modules/UI/videolayout/VideoLayout.js @@ -186,6 +186,13 @@ function getCameraVideoSize(videoWidth, * Sets the display name for the given video span id. */ function setDisplayName(videoSpanId, displayName, key) { + + if (!$('#' + videoSpanId).length) { + console.warn( + "Unable to set displayName - " + videoSpanId + " does not exist"); + return; + } + var nameSpan = $('#' + videoSpanId + '>span.displayname'); var defaultLocalDisplayName = APP.translation.generateTranslatonHTML( interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME); @@ -636,17 +643,15 @@ var VideoLayout = (function (my) { var myResourceJid = APP.xmpp.myResource(); - VideoLayout.updateLargeVideo(localVideoSrc, 0, - myResourceJid); + VideoLayout.updateLargeVideo(localVideoSrc, 0, myResourceJid); }; my.mucJoined = function () { var myResourceJid = APP.xmpp.myResource(); - if(!largeVideoState.userResourceJid) - VideoLayout.updateLargeVideo(localVideoSrc, 0, - myResourceJid, true); + if (!largeVideoState.userResourceJid) + VideoLayout.updateLargeVideo(localVideoSrc, 0, myResourceJid, true); }; /** @@ -1882,8 +1887,7 @@ var VideoLayout = (function (my) { */ my.onDominantSpeakerChanged = function (resourceJid) { // We ignore local user events. - if (resourceJid - === APP.xmpp.myResource()) + if (resourceJid === APP.xmpp.myResource()) return; var members = APP.xmpp.getMembers(); @@ -1919,8 +1923,10 @@ var VideoLayout = (function (my) { // Update the large video if the video source is already available, // otherwise wait for the "videoactive.jingle" event. - if (video.length && video[0].currentTime > 0) - VideoLayout.updateLargeVideo(APP.RTC.getVideoSrc(video[0]), resourceJid); + if (video.length && video[0].currentTime > 0) { + VideoLayout.updateLargeVideo( + APP.RTC.getVideoSrc(video[0]), 1, resourceJid); + } } }; @@ -2065,7 +2071,7 @@ var VideoLayout = (function (my) { continue; // videoSrcToSsrc needs to be update for this call to succeed. - VideoLayout.updateLargeVideo(src); + VideoLayout.updateLargeVideo(src, 1, resource); break; } @@ -2282,7 +2288,8 @@ var VideoLayout = (function (my) { my.participantLeft = function (jid) { // Unlock large video - if (focusedVideoInfo && focusedVideoInfo.jid === jid) + var resourceJid = Strophe.getResourceFromJid(jid); + if (focusedVideoInfo && focusedVideoInfo.resourceJid === resourceJid) { console.info("Focused video owner has left the conference"); focusedVideoInfo = null; diff --git a/modules/xmpp/strophe.jingle.js b/modules/xmpp/strophe.jingle.js index 59508c588..1191e2776 100644 --- a/modules/xmpp/strophe.jingle.js +++ b/modules/xmpp/strophe.jingle.js @@ -44,6 +44,7 @@ module.exports = function(XMPP, eventEmitter) this.connection.disco.addFeature('urn:xmpp:jingle:1'); this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:1'); this.connection.disco.addFeature('urn:xmpp:jingle:transports:ice-udp:1'); + this.connection.disco.addFeature('urn:xmpp:jingle:apps:dtls:0'); this.connection.disco.addFeature('urn:xmpp:jingle:transports:dtls-sctp:1'); this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:audio'); this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:video');