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
pull/391/head
Alex 2020-02-19 10:50:48 +01:00
parent 69ab47edc8
commit 2e7c51f773
1 changed files with 2 additions and 10 deletions

View File

@ -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;