webrtc-issue-detector icon indicating copy to clipboard operation
webrtc-issue-detector copied to clipboard

MOS discrepany for Firefox

Open subbro opened this issue 6 months ago • 2 comments

Hi All, I am currently working on a project to enable VoIP calling on our application. To gauge the quality of the call, I plan to use MOS (Mean Opinion Score) which is available out of the box with webrtc-issue-detector library. However, when I use this library on my application in Chrome(V120) I see the score varying somewhere between 3.5 to 4.1 based on internet connectivity . But when I test this in Firefox (V115), I see the score to be almost constant and the value does not go down below 4.4. I have also tried webrtc-adapter but it doesn't help

Example:

Network stats:
 {"inboundStatsSample": {"avgJitter":0.001,"rtt":0,"packetsLoss":0},
"outboundStatsSample":{"avgJitter":0.019,"rtt":0,"packetsLoss":0}} 
Inbound network score 4.404392390941931 
Outbound network score 4.404375582089046

Network stats 
{"inboundStatsSample":{"avgJitter":0.002,"rtt":0,"packetsLoss":0},
"outboundStatsSample":{"avgJitter":0.019,"rtt":0,"packetsLoss":0}}
Inbound network score 4.404392390941931 
Outbound network score 4.404375582089046

Code:

    const webRtcIssueDetector = new WebRTCIssueDetector({
        onIssues: (issues) => issues.map((issue) => {
            console.log('Issues type:', issue.type); // eg. "network"
            console.log('Issues reason:', issue.reason); // eg. "outbound-network-throughput"
            console.log('Stats:', issue.statsSample); // eg. "packetLossPct: 12%, avgJitter: 230, rtt: 150"
        }),
        onNetworkScoresUpdated: (scores) => {
            console.log('Inbound network score', scores.inbound); // eg. 3.7
            console.log('Outbound network score', scores.outbound); // eg. 4.5
            console.log('Network stats', JSON.stringify(scores.statsSamples )); // eg. { inboundStatsSample: { avgJitter: 0.1, rtt: 30, packetsLoss: 8 }, ... }
        },
    });

Strange, but I have never seen the packetsLoss and rtt to be greater than 0 in Firefox

Looking forward for help..!! Thanks

subbro avatar Dec 31 '23 14:12 subbro