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
feat(log): Logs server field from jwt token
hristoterezovfcc9532bde5f
diff --git a/app.js b/app.jsindex 31b202feb1..627b577028 100644--- a/app.js+++ b/app.js@@ -110,6 +110,11 @@ function init() {var isUIReady = APP.UI.start();if (isUIReady) {APP.conference.init({roomName: buildRoomName()}).then(function () {+ let server = APP.tokenData.server;+ if(server) {+ APP.conference.logEvent("server." + server, 1);+ }+APP.UI.initConference();APP.UI.addListener(UIEvents.LANG_CHANGED, function (language) {diff --git a/conference.js b/conference.jsindex 7026f2d6e4..cb2919e0f8 100644--- a/conference.js+++ b/conference.js@@ -1766,5 +1766,20 @@ export default {// Update the viewAPP.UI.setLocalRaisedHandStatus(raisedHand);}+ },+ /**+ * Log event to callstats and analytics.+ * @param {string} name the event name+ * @param {int} value the value (it's int because google analytics supports+ * only int).+ * NOTE: Should be used after conference.init+ */+ logEvent(name, value) {+ if(JitsiMeetJS.analytics) {+ JitsiMeetJS.analytics.sendEvent(name, value);+ }+ if(room) {+ room.sendApplicationLog(JSON.stringify({name, value}));+ }}};diff --git a/modules/TokenData/TokenData.js b/modules/TokenData/TokenData.jsindex 313a4850e9..9db4df5832 100644--- a/modules/TokenData/TokenData.js+++ b/modules/TokenData/TokenData.js@@ -97,6 +97,7 @@ class TokenData{this.payload = this.decodedJWT.payload;if(!this.payload.context)return;+ this.server = this.payload.context.server;let callerData = this.payload.context.user;let calleeData = this.payload.context.callee;if(callerData)