firefox framerate correct key.

This commit is contained in:
Miroslav Šedivý 2021-03-17 17:10:14 +01:00
parent df933c8e60
commit 0dbab610aa

View File

@ -348,9 +348,9 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
this.emit('stats', { this.emit('stats', {
bitrate: (bytesDiff / tsDiff) * 1000, bitrate: (bytesDiff / tsDiff) * 1000,
packetLoss: (packetsLostDiff / (packetsLostDiff + packetsReceivedDiff)) * 100, packetLoss: (packetsLostDiff / (packetsLostDiff + packetsReceivedDiff)) * 100,
fps: report.framesPerSecond, fps: Number(report.framesPerSecond || report.framerateMean),
width: report.frameWidth, width: report.frameWidth || NaN,
height: report.frameHeight, height: report.frameHeight || NaN,
}) })
} }