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
Merge branch 'master' into ssfocus
paweldomase308025143c2
diff --cc config.jsindex 5c2fef5bf2,47f3891c50..716c7c332b--- a/config.js+++ b/config.js@@@ -4,8 -4,7 +4,8 @@@ var config =//anonymousdomain: 'guest.example.com',muc: 'conference.jitsi-meet.example.com', // FIXME: use XEP-0030bridge: 'jitsi-videobridge.jitsi-meet.example.com', // FIXME: use XEP-0030- call_control: 'callcontrol.jitsi-meet.example.com',- //call_control: 'callcontrol.jitsi-meet.example.com'++ //call_control: 'callcontrol.jitsi-meet.example.com',+ focus: 'focus.jitsi-meet.example.com'},// getroomnode: function (path) { return 'someprefixpossiblybasedonpath'; },// useStunTurn: true, // use XEP-0215 to fetch STUN and TURN server@@@ -26,8 -24,9 +26,10 @@@adaptiveSimulcast: false,useRtcpMux: true,useBundle: true,- enableRecording: true,- enableWelcomePage: false,+ enableRecording: false,+ enableWelcomePage: true,enableSimulcast: false,- enableFirefoxSupport: false //firefox support is still experimental, only one-to-one conferences with chrome focus++ enableFirefoxSupport: false, //firefox support is still experimental, only one-to-one conferences with chrome focus+ // will work when simulcast, bundle, mux, lastN and SCTP are disabled.+ logStats: false // Enable logging of PeerConnection stats via the focus};diff --cc libs/strophe/strophe.jingle.session.jsindex 6ba2c6e870,2e30000aa8..711ea39779--- a/libs/strophe/strophe.jingle.session.js+++ b/libs/strophe/strophe.jingle.session.js@@@ -128,8 -130,23 +130,7 @@@ JingleSession.prototype.accept = functiinitiator: this.initiator,responder: this.responder,sid: this.sid });- prsdp.toJingle(accept, this.initiator == this.me ? 'initiator' : 'responder');-+ prsdp.toJingle(accept, this.initiator == this.me ? 'initiator' : 'responder', this.localStreamsSSRC);- this.connection.sendIQ(accept,- function () {- var ack = {};- ack.source = 'answer';- $(document).trigger('ack.jingle', [self.sid, ack]);- },- function (stanza) {- var error = ($(stanza).find('error').length) ? {- code: $(stanza).find('error').attr('code'),- reason: $(stanza).find('error :first')[0].tagName,- }:{};- error.source = 'answer';- $(document).trigger('error.jingle', [self.sid, error]);- },- 10000);-var sdp = this.peerconnection.localDescription.sdp;while (SDPUtil.find_line(sdp, 'a=inactive')) {// FIXME: change any inactive to sendrecv or whatever they were originally@@@ -139,22 -156,6 +140,22 @@@function () {//console.log('setLocalDescription success');$(document).trigger('setLocalDescription.jingle', [self.sid]);++ this.connection.sendIQ(accept,+ function () {+ var ack = {};+ ack.source = 'answer';+ $(document).trigger('ack.jingle', [self.sid, ack]);+ },+ function (stanza) {+ var error = ($(stanza).find('error').length) ? {+ code: $(stanza).find('error').attr('code'),- reason: $(stanza).find('error :first')[0].tagName,++ reason: $(stanza).find('error :first')[0].tagName+ }:{};+ error.source = 'answer';+ $(document).trigger('error.jingle', [self.sid, error]);+ },+ 10000);},function (e) {console.error('setLocalDescription failed', e);diff --cc rtp_sts.jsindex 27270ad081,6053cf24a7..654109d454--- a/rtp_sts.js+++ b/rtp_sts.js@@@ -240,84 -238,38 +274,114 @@@ StatsCollector.prototype.start = functi},self.statsIntervalMilis);++ if (config.logStats) {+ this.gatherStatsIntervalId = setInterval(+ function () {+ self.peerconnection.getStats(+ function (report) {+ self.addStatsToBeLogged(report.result());+ },+ function () {+ }+ );+ },+ this.GATHER_INTERVAL+ );++ this.logStatsIntervalId = setInterval(+ function() { self.logStats(); },+ this.LOG_INTERVAL);+ }};+/**+ * Converts the stats to the format used for logging, and saves the data in+ * this.statsToBeLogged.+ * @param reports Reports as given by webkitRTCPerConnection.getStats.+ */+StatsCollector.prototype.addStatsToBeLogged = function (reports) {+ var self = this;+ var num_records = this.statsToBeLogged.timestamps.length;+ this.statsToBeLogged.timestamps.push(new Date().getTime());+ reports.map(function (report) {+ var stat = self.statsToBeLogged.stats[report.id];+ if (!stat) {+ stat = self.statsToBeLogged.stats[report.id] = {};+ }+ stat.type = report.type;+ report.names().map(function (name) {+ var values = stat[name];+ if (!values) {+ values = stat[name] = [];+ }+ while (values.length < num_records) {+ values.push(null);+ }+ values.push(report.stat(name));+ });+ });+};++StatsCollector.prototype.logStats = function () {+ if (!focusJid) {+ return;+ }++ var deflate = true;++ var content = JSON.stringify(this.statsToBeLogged);+ if (deflate) {+ content = String.fromCharCode.apply(null, Pako.deflateRaw(content));+ }+ content = Base64.encode(content);++ // XEP-0337-ish+ var message = $msg({to: focusJid, type: 'normal'});+ message.c('log', { xmlns: 'urn:xmpp:eventlog',+ id: 'PeerConnectionStats'});+ message.c('message').t(content).up();+ if (deflate) {+ message.c('tag', {name: "deflated", value: "true"}).up();+ }+ message.up();++ connection.send(message);++ // Reset the stats+ this.statsToBeLogged.stats = {};+ this.statsToBeLogged.timestamps = [];+};+ var keyMap = {+ "firefox": {+ "ssrc": "ssrc",+ "packetsReceived": "packetsReceived",+ "packetsLost": "packetsLost",+ "packetsSent": "packetsSent",+ "bytesReceived": "bytesReceived",+ "bytesSent": "bytesSent"+ },+ "chrome": {+ "receiveBandwidth": "googAvailableReceiveBandwidth",+ "sendBandwidth": "googAvailableSendBandwidth",+ "remoteAddress": "googRemoteAddress",+ "transportType": "googTransportType",+ "localAddress": "googLocalAddress",+ "activeConnection": "googActiveConnection",+ "ssrc": "ssrc",+ "packetsReceived": "packetsReceived",+ "packetsSent": "packetsSent",+ "packetsLost": "packetsLost",+ "bytesReceived": "bytesReceived",+ "bytesSent": "bytesSent",+ "googFrameHeightReceived": "googFrameHeightReceived",+ "googFrameWidthReceived": "googFrameWidthReceived",+ "googFrameHeightSent": "googFrameHeightSent",+ "googFrameWidthSent": "googFrameWidthSent",+ "audioInputLevel": "audioInputLevel",+ "audioOutputLevel": "audioOutputLevel"+ }+ };/*** Stats processing logic.diff --cc videolayout.jsindex 0076f2ea8c,358bce47d9..941c041b2a--- a/videolayout.js+++ b/videolayout.js@@@ -1646,10 -1649,10 +1666,10 @@@ var VideoLayout = (function (my)|| (parentResourceJid&& VideoLayout.getDominantSpeakerResourceJid()=== parentResourceJid)) {- VideoLayout.updateLargeVideo(videoelem.attr('src'), 1);+ VideoLayout.updateLargeVideo(RTC.getVideoSrc(videoelem[0]), 1, parentResourceJid);}- VideoLayout.showFocusIndicator();+ VideoLayout.showModeratorIndicator();}});