Merge branch 'logs' of https://github.com/isymchych/jitsi-meet into jitsi-meet-new
This commit is contained in:
commit
41b1a6f3c3
|
@ -270,6 +270,9 @@ export default {
|
|||
},
|
||||
// end used by torture
|
||||
|
||||
getLogs () {
|
||||
return room.getLogs();
|
||||
},
|
||||
_createRoom () {
|
||||
room = connection.initJitsiConference(APP.conference.roomName,
|
||||
this._getConferenceOptions());
|
||||
|
@ -286,6 +289,7 @@ export default {
|
|||
});
|
||||
roomLocker = createRoomLocker(room);
|
||||
this._room = room; // FIXME do not use this
|
||||
this.localId = room.myUserId();
|
||||
|
||||
let email = APP.settings.getEmail();
|
||||
email && sendEmail(email);
|
||||
|
|
|
@ -698,6 +698,27 @@ JitsiConference.prototype.isStartVideoMuted = function () {
|
|||
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 +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 +3724,7 @@ var ScreenObtainer = {
|
|||
// 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 +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")
|
||||
|
|
|
@ -279,8 +279,12 @@ UI.start = function () {
|
|||
$('#notice').css({display: 'block'});
|
||||
}
|
||||
$("#downloadlog").click(function (event) {
|
||||
// dump(event.target);
|
||||
// FIXME integrate logs
|
||||
let logs = APP.conference.getLogs();
|
||||
let data = encodeURIComponent(JSON.stringify(logs, null, ' '));
|
||||
|
||||
let elem = event.target.parentNode;
|
||||
elem.download = 'meetlog.json';
|
||||
elem.href = 'data:application/json;charset=utf-8,\n' + data;
|
||||
});
|
||||
Feedback.init();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue