Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Removes misleading documentation. Formatting fixes.
Boris Grozev68421465a769
diff --git a/modules/xmpp/SDPDiffer.js b/modules/xmpp/SDPDiffer.jsindex d8f5203b25..ff4341e396 100644--- a/modules/xmpp/SDPDiffer.js+++ b/modules/xmpp/SDPDiffer.js@@ -1,14 +1,14 @@-var SDPUtil = require("./SDPUtil");-function SDPDiffer(mySDP, otherSDP) {+function SDPDiffer(mySDP, otherSDP)+{this.mySDP = mySDP;this.otherSDP = otherSDP;}/**- * Returns map of MediaChannel that contains only media not contained in <tt>otherSdp</tt>. Mapped by channel idx.- * @param otherSdp the other SDP to check ssrc with.+ * Returns map of MediaChannel that contains media contained in+ * 'mySDP', but not contained in 'otherSdp'. Mapped by channel idx.*/SDPDiffer.prototype.getNewMedia = function() {@@ -30,7 +30,8 @@ SDPDiffer.prototype.getNewMedia = function() {return false;}else if (this[i] != array[i]) {- // Warning - two different object instances will never be equal: {x:20} != {x:20}+ // Warning - two different object instances will never be+ // equal: {x:20} != {x:20}return false;}}@@ -48,10 +49,11 @@ SDPDiffer.prototype.getNewMedia = function() {newMedia[othersMediaIdx] = othersMedia;return;}- // Look for new ssrcs accross the channel+ // Look for new ssrcs across the channelObject.keys(othersMedia.ssrcs).forEach(function(ssrc) {if(Object.keys(myMedia.ssrcs).indexOf(ssrc) === -1) {- // Allocate channel if we've found ssrc that doesn't exist in our channel+ // Allocate channel if we've found ssrc that doesn't exist in+ // our channelif(!newMedia[othersMediaIdx]){newMedia[othersMediaIdx] = {mediaindex: othersMedia.mediaindex,@@ -71,8 +73,9 @@ SDPDiffer.prototype.getNewMedia = function() {var matched = false;for (var i = 0; i < myMedia.ssrcGroups.length; i++) {var mySsrcGroup = myMedia.ssrcGroups[i];- if (otherSsrcGroup.semantics == mySsrcGroup.semantics- && arrayEquals.apply(otherSsrcGroup.ssrcs, [mySsrcGroup.ssrcs])) {+ if (otherSsrcGroup.semantics == mySsrcGroup.semantics &&+ arrayEquals.apply(otherSsrcGroup.ssrcs,+ [mySsrcGroup.ssrcs])) {matched = true;break;@@ -99,27 +102,21 @@ SDPDiffer.prototype.getNewMedia = function() {};/**- * Sends SSRC update IQ.- * @param sdpMediaSsrcs SSRCs map obtained from SDP.getNewMedia. Cntains SSRCs to add/remove.- * @param sid session identifier that will be put into the IQ.- * @param initiator initiator identifier.- * @param toJid destination Jid- * @param isAdd indicates if this is remove or add operation.+ * TODO: document!*/SDPDiffer.prototype.toJingle = function(modify) {var sdpMediaSsrcs = this.getNewMedia();- var self = this;- // FIXME: only announce video ssrcs since we mix audio and dont need- // the audio ssrcs thereforevar modified = false;Object.keys(sdpMediaSsrcs).forEach(function(mediaindex){modified = true;var media = sdpMediaSsrcs[mediaindex];modify.c('content', {name: media.mid});- modify.c('description', {xmlns:'urn:xmpp:jingle:apps:rtp:1', media: media.mid});- // FIXME: not completly sure this operates on blocks and / or handles different ssrcs correctly+ modify.c('description',+ {xmlns:'urn:xmpp:jingle:apps:rtp:1', media: media.mid});+ // FIXME: not completely sure this operates on blocks and / or handles+ // different ssrcs correctly// generate sources from linesObject.keys(media.ssrcs).forEach(function(ssrcNum) {var mediaSsrc = media.ssrcs[ssrcNum];diff --git a/modules/xmpp/TraceablePeerConnection.js b/modules/xmpp/TraceablePeerConnection.jsindex ee748fd39b..8d7344016d 100644--- a/modules/xmpp/TraceablePeerConnection.js+++ b/modules/xmpp/TraceablePeerConnection.js@@ -1,3 +1,4 @@+/* global $ */var RTC = require('../RTC/RTC');var RTCBrowserType = require("../RTC/RTCBrowserType.js");var XMPPEvents = require("../../service/xmpp/XMPPEvents");@@ -174,7 +175,8 @@ var normalizePlanB = function(desc) {}if (typeof mLine.ssrcs !== 'undefined' && Array.isArray(mLine.ssrcs)) {- for (var i = 0; i<mLine.ssrcs.length; i++){+ var i;+ for (i = 0; i<mLine.ssrcs.length; i++){if (typeof mLine.ssrcs[i] === 'object'&& typeof mLine.ssrcs[i].id !== 'undefined'&& $.inArray(mLine.ssrcs[i].id, firstSsrcs) == 0) {@@ -183,7 +185,7 @@ var normalizePlanB = function(desc) {}}- for (var i = 0; i<mLine.ssrcs.length; i++){+ for (i = 0; i<mLine.ssrcs.length; i++){if (typeof mLine.ssrcs[i] !== 'undefined') {newSsrcLines.push(mLine.ssrcs[i]);}