Skip to content

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

feat(stats) add support for watchRTC

subhamcyara470e987fad79
diff --git a/config.js b/config.js
index d121683592..ea9a54080e 100644
--- a/config.js
+++ b/config.js
@@ -1008,6 +1008,11 @@ var config = {
// "libs/analytics-ga.min.js", // google-analytics
// "https://example.com/my-custom-analytics.js",
// ],
+
+ // By enabling watchRTCEnabled option you would want to use watchRTC feature
+ // This would also require to configure watchRTCConfigParams.
+ // Please remember to keep rtcstatsEnabled disabled for watchRTC to work.
+ // watchRTCEnabled: false,
},
// Logs that should go be passed through the 'log' event if a handler is defined for it
@@ -1602,6 +1607,40 @@ var config = {
// // https://github.com/jitsi/excalidraw-backend
// collabServerBaseUrl: 'https://excalidraw-backend.example.com',
// },
+
+ // The watchRTC initialize config params as described :
+ // https://testrtc.com/docs/installing-the-watchrtc-javascript-sdk/#h-set-up-the-sdk
+ // https://www.npmjs.com/package/@testrtc/watchrtc-sdk
+ // watchRTCConfigParams: {
+ // /** Watchrtc api key */
+ // rtcApiKey: string;
+ // /** Identifier for the session */
+ // rtcRoomId?: string;
+ // /** Identifier for the current peer */
+ // rtcPeerId?: string;
+ // /**
+ // * ["tag1", "tag2", "tag3"]
+ // * @deprecated use 'keys' instead
+ // */
+ // rtcTags?: string[];
+ // /** { "key1": "value1", "key2": "value2"} */
+ // keys?: any;
+ // /** Enables additional logging */
+ // debug?: boolean;
+ // rtcToken?: string;
+ // /**
+ // * @deprecated No longer needed. Use "proxyUrl" instead.
+ // */
+ // wsUrl?: string;
+ // proxyUrl?: string;
+ // console?: {
+ // level: string;
+ // override: boolean;
+ // };
+ // allowBrowserLogCollection?: boolean;
+ // collectionInterval?: number;
+ // logGetStats?: boolean;
+ // },
};
// Temporary backwards compatibility with old mobile clients.
diff --git a/react/features/base/config/configType.ts b/react/features/base/config/configType.ts
index c2b3cbbb69..6960b05817 100644
--- a/react/features/base/config/configType.ts
+++ b/react/features/base/config/configType.ts
@@ -126,6 +126,25 @@ export interface INoiseSuppressionConfig {
};
}
+export interface IWatchRTCConfiguration {
+ allowBrowserLogCollection?: boolean;
+ collectionInterval?: number;
+ console?: {
+ level: string;
+ override: boolean;
+ };
+ debug?: boolean;
+ keys?: any;
+ logGetStats?: boolean;
+ proxyUrl?: string;
+ rtcApiKey: string;
+ rtcPeerId?: string;
+ rtcRoomId?: string;
+ rtcTags?: string[];
+ rtcToken?: string;
+ wsUrl?: string;
+}
+
export interface IConfig {
_desktopSharingSourceDevice?: string;
_immediateReloadThreshold?: string;
@@ -145,6 +164,7 @@ export interface IConfig {
rtcstatsStoreLogs?: boolean;
rtcstatsUseLegacy?: boolean;
scriptURLs?: Array<string>;
+ watchRTCEnabled?: boolean;
whiteListedEvents?: string[];
};
apiLogLevels?: Array<'warn' | 'log' | 'error' | 'info' | 'debug'>;
@@ -560,6 +580,7 @@ export interface IConfig {
mobileCodecPreferenceOrder?: Array<string>;
persist?: boolean;
};
+ watchRTCConfigParams?: IWatchRTCConfiguration;
webhookProxyUrl?: string;
webrtcIceTcpDisable?: boolean;
webrtcIceUdpDisable?: boolean;
diff --git a/react/features/base/config/configWhitelist.ts b/react/features/base/config/configWhitelist.ts
index 39d108afb2..f7a160d975 100644
--- a/react/features/base/config/configWhitelist.ts
+++ b/react/features/base/config/configWhitelist.ts
@@ -15,6 +15,7 @@ export default [
'_peerConnStatusRtcMuteTimeout',
'analytics.disabled',
'analytics.rtcstatsEnabled',
+ 'analytics.watchRTCEnabled',
'audioLevelsInterval',
'audioQuality',
'autoKnockLobby',
@@ -227,6 +228,7 @@ export default [
'useHostPageLocalStorage',
'useTurnUdp',
'videoQuality',
+ 'watchRTCConfigParams',
'webrtcIceTcpDisable',
'webrtcIceUdpDisable',
'whiteboard.enabled'
diff --git a/react/features/base/config/functions.native.ts b/react/features/base/config/functions.native.ts
index c99c30d8f9..4e4d8e968f 100644
--- a/react/features/base/config/functions.native.ts
+++ b/react/features/base/config/functions.native.ts
@@ -27,8 +27,10 @@ export function _cleanupConfig(config: IConfig) {
delete config.analytics?.rtcstatsSendSdp;
delete config.analytics?.rtcstatsUseLegacy;
delete config.analytics?.obfuscateRoomName;
+ delete config.analytics?.watchRTCEnabled;
delete config.callStatsID;
delete config.callStatsSecret;
+ delete config.watchRTCConfigParams;
config.giphy = { enabled: false };
}
}