Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Merge branch 'logs' of https://github.com/isymchych/jitsi-meet into jitsi-meet-new

damencho41b1a6f3c3d0
diff --cc conference.js
index 3cf2e78341,1bad4b0168..4d5feabb46
--- a/conference.js
+++ b/conference.js
@@@ -244,32 -243,9 +244,35 @@@ export default
return this._room
&& this._room.myUserId();
},
+ /**
+ * Will be filled with values only when config.debug is enabled.
+ * Its used by torture to check audio levels.
+ */
+ audioLevelsMap: {},
+ getPeerSSRCAudioLevel (id) {
+ return this.audioLevelsMap[id];
+ },
+ /**
+ * Will check for number of remote particiapnts that have at least one
+ * remote track.
+ * @return boolean whether we have enough participants with remote streams
+ */
+ checkEnoughParticipants (number) {
+ var participants = this._room.getParticipants();
+
+ var foundParticipants = 0;
+ for (var i = 0; i < participants.length; i += 1) {
+ if (participants[i].getTracks().length > 0) {
+ foundParticipants++;
+ }
+ }
+ return foundParticipants >= number;
+ },
+ // end used by torture
+
+ getLogs () {
+ return room.getLogs();
+ },
_createRoom () {
room = connection.initJitsiConference(APP.conference.roomName,
this._getConferenceOptions());
diff --cc libs/lib-jitsi-meet.js
index 79e27c81ba,239f5bff01..1b0d2ae7e5
--- a/libs/lib-jitsi-meet.js
+++ b/libs/lib-jitsi-meet.js
@@@ -698,6 -698,24 +698,27 @@@ JitsiConference.prototype.isStartVideoM
return this.startVideoMuted;
};
++/**
++ * Get object with internal logs.
++ */
+ JitsiConference.prototype.getLogs = function () {
+ var data = this.xmpp.getJingleLog();
+
+ var metadata = {};
+ metadata.time = new Date();
+ metadata.url = window.location.href;
+ metadata.ua = navigator.userAgent;
+
+ var log = this.xmpp.getXmppLog();
+ if (log) {
+ metadata.xmpp = log;
+ }
+
+ data.metadata = metadata;
+
+ return data;
+ };
+
/**
* Setups the listeners needed for the conference.
* @param conference the conference
@@@ -3684,6 -3702,6 +3705,7 @@@ var ScreenObtainer =
* 'desktop' stream for returned stream token.
*/
obtainScreenFromExtension: function (streamCallback, failCallback) {
++ var self = this;
if (chromeExtInstalled) {
doGetStreamFromExtension(this.options, streamCallback,
failCallback);
@@@ -3702,7 -3720,7 +3724,7 @@@
// We need to give a moment for the endpoint to become
// available
window.setTimeout(function () {
-- doGetStreamFromExtension(this.options, streamCallback,
++ doGetStreamFromExtension(self.options, streamCallback,
failCallback);
}, 500);
},
@@@ -12519,22 -12537,22 +12541,6 @@@ XMPP.prototype.disconnect = function (
this.connection.disconnect();
};
--/**
-- * Gets the SSRC of local media stream.
-- * @param mediaType the media type that tells whether we want to get
-- * the SSRC of local audio or video stream.
-- * @returns {*} the SSRC number for local media stream or <tt>null</tt> if
-- * not available.
-- */
--XMPP.prototype.getLocalSSRC = function (mediaType) {
-- if (this.connection.jingle.activecall &&
-- this.connection.jingle.activecall.peerconnection) {
-- return this.connection.jingle.activecall.getLocalSSRC(mediaType);
-- } else {
-- return null;
-- }
--};
--
module.exports = XMPP;
}).call(this,"/modules/xmpp/xmpp.js")