|
|
@@ -686,19 +686,19 @@ StatsCollector.prototype.processStatsReport = function() {
|
|
686
|
686
|
} catch (e) { /* not supported*/ }
|
|
687
|
687
|
|
|
688
|
688
|
// Tries to get frame rate
|
|
|
689
|
+ let frameRate;
|
|
|
690
|
+
|
|
689
|
691
|
try {
|
|
690
|
|
- ssrcStats.setFramerate(
|
|
691
|
|
- getStatValue(now, 'googFrameRateReceived')
|
|
692
|
|
- || getStatValue(now, 'googFrameRateSent')
|
|
693
|
|
- || 0);
|
|
|
692
|
+ frameRate = getStatValue(now, 'googFrameRateReceived')
|
|
|
693
|
+ || getStatValue(now, 'googFrameRateSent') || 0;
|
|
694
|
694
|
} catch (e) {
|
|
695
|
695
|
// if it fails with previous properties(chrome),
|
|
696
|
696
|
// let's try with another one (FF)
|
|
697
|
697
|
try {
|
|
698
|
|
- ssrcStats.setFramerate(Math.round(
|
|
699
|
|
- this.getNonNegativeStat(now, 'framerateMean')));
|
|
|
698
|
+ frameRate = this.getNonNegativeStat(now, 'framerateMean');
|
|
700
|
699
|
} catch (err) { /* not supported*/ }
|
|
701
|
700
|
}
|
|
|
701
|
+ ssrcStats.setFramerate(Math.round(frameRate || 0));
|
|
702
|
702
|
|
|
703
|
703
|
if (resolution.height && resolution.width) {
|
|
704
|
704
|
ssrcStats.setResolution(resolution);
|