From 2e7c51f773395f1fb2a333615587ff018cb07b22 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 19 Feb 2020 10:50:48 +0100 Subject: [PATCH] Fix to get stats in Firefox I eliminate some conditions that caused not to access and collect the statistics in Firefox, since either its value was undefined in all cases or the ids do not incorporate the expected words, since they are only alphanumeric random ids --- .../src/OpenViduInternal/WebRtcStats/WebRtcStats.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/openvidu-browser/src/OpenViduInternal/WebRtcStats/WebRtcStats.ts b/openvidu-browser/src/OpenViduInternal/WebRtcStats/WebRtcStats.ts index f08b6beb..1e45c1e6 100644 --- a/openvidu-browser/src/OpenViduInternal/WebRtcStats/WebRtcStats.ts +++ b/openvidu-browser/src/OpenViduInternal/WebRtcStats/WebRtcStats.ts @@ -183,10 +183,7 @@ export class WebRtcStats { if ((stat.type === 'inbound-rtp') && ( // Avoid firefox empty outbound-rtp statistics - stat.nackCount !== null && - stat.isRemote === false && - stat.id.startsWith('inbound') && - stat.remoteId.startsWith('inbound') + stat.nackCount !== null )) { const metricId = 'webrtc_inbound_' + stat.mediaType + '_' + stat.ssrc; @@ -231,12 +228,7 @@ export class WebRtcStats { sendPost(JSON.stringify(json)); - } else if ((stat.type === 'outbound-rtp') && - ( - // Avoid firefox empty inbound-rtp statistics - stat.isRemote === false && - stat.id.toLowerCase().includes('outbound') - )) { + } else if (stat.type === 'outbound-rtp'){ const metricId = 'webrtc_outbound_' + stat.mediaType + '_' + stat.ssrc;