Use rtcstats with keep-alive / add rtcstats enabled config

This commit is contained in:
Andrei Gavrilescu 2020-08-18 13:52:19 +03:00 committed by Hristo Terezov
parent 2c2edace2a
commit d725c0ab8a
4 changed files with 11 additions and 5 deletions

View File

@ -459,6 +459,12 @@ var config = {
// amplitudeAPPKey: '<APP_KEY>'
// Configuration for the rtcstats server:
+ // By enabling rtcstats server every time a conference is joined the rtcstats
// module connects to the provided rtcstatsEndpoint and sends statistics regarding
// PeerConnection states along with getStats metrics polled at the specified
// interval.
// rtcstatsEnabled: true,
// In order to enable rtcstats one needs to provide a endpoint url.
// rtcstatsEndpoint: wss://rtcstats-server-pilot.jitsi.net/,

4
package-lock.json generated
View File

@ -22300,8 +22300,8 @@
}
},
"rtcstats": {
"version": "github:jitsi/rtcstats#02a1a089d9a97d1414d216ff7d9c432253e50190",
"from": "github:jitsi/rtcstats#v6.1.3",
"version": "github:jitsi/rtcstats#0597c6a928f321d3cdec947d877012b7e8c2f1dc",
"from": "github:jitsi/rtcstats#v6.2.0",
"requires": {
"@jitsi/js-utils": "1.0.0"
},

View File

@ -90,7 +90,7 @@
"redux": "4.0.4",
"redux-thunk": "2.2.0",
"rnnoise-wasm": "github:jitsi/rnnoise-wasm.git#566a16885897704d6e6d67a1d5ac5d39781db2af",
"rtcstats": "github:jitsi/rtcstats#v6.1.3",
"rtcstats": "github:jitsi/rtcstats#v6.2.0",
"styled-components": "3.4.9",
"util": "0.12.1",
"uuid": "3.1.0",

View File

@ -25,7 +25,7 @@ MiddlewareRegistry.register(store => next => action => {
switch (action.type) {
case LIB_WILL_INIT: {
if (analytics.rtcstatsEndpoint) {
if (analytics.rtcstatsEnabled) {
// RTCStats "proxies" WebRTC functions such as GUM and RTCPeerConnection by rewriting the global
// window functions. Because lib-jitsi-meet uses references to those functions that are taken on
// init, we need to add these proxies before it initializes, otherwise lib-jitsi-meet will use the
@ -47,7 +47,7 @@ MiddlewareRegistry.register(store => next => action => {
break;
}
case CONFERENCE_JOINED: {
if (analytics.rtcstatsEndpoint && RTCStats.isInitialized()) {
if (analytics.rtcstatsEnabled && RTCStats.isInitialized()) {
// Once the conference started connect to the rtcstats server and send data.
try {
RTCStats.connect();