mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 23:57:19 +02:00
Only show FL/PL percentage when it's > 1%
This commit is contained in:
parent
57fb22b905
commit
c1786d3fba
8
dist/better-xcloud.lite.user.js
vendored
8
dist/better-xcloud.lite.user.js
vendored
@ -2133,16 +2133,16 @@ class StreamStatsCollector {
|
|||||||
received: 0,
|
received: 0,
|
||||||
dropped: 0,
|
dropped: 0,
|
||||||
toString() {
|
toString() {
|
||||||
let framesDroppedPercentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
let percentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
||||||
return framesDroppedPercentage === "0.0" ? this.dropped.toString() : `${this.dropped} (${framesDroppedPercentage}%)`;
|
return percentage.startsWith("0.") ? this.dropped.toString() : `${this.dropped} (${percentage}%)`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pl: {
|
pl: {
|
||||||
received: 0,
|
received: 0,
|
||||||
dropped: 0,
|
dropped: 0,
|
||||||
toString() {
|
toString() {
|
||||||
let packetsLostPercentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
let percentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
||||||
return packetsLostPercentage === "0.0" ? this.dropped.toString() : `${this.dropped} (${packetsLostPercentage}%)`;
|
return percentage.startsWith("0.") ? this.dropped.toString() : `${this.dropped} (${percentage}%)`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dt: {
|
dt: {
|
||||||
|
8
dist/better-xcloud.user.js
vendored
8
dist/better-xcloud.user.js
vendored
@ -2243,16 +2243,16 @@ class StreamStatsCollector {
|
|||||||
received: 0,
|
received: 0,
|
||||||
dropped: 0,
|
dropped: 0,
|
||||||
toString() {
|
toString() {
|
||||||
let framesDroppedPercentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
let percentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
||||||
return framesDroppedPercentage === "0.0" ? this.dropped.toString() : `${this.dropped} (${framesDroppedPercentage}%)`;
|
return percentage.startsWith("0.") ? this.dropped.toString() : `${this.dropped} (${percentage}%)`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pl: {
|
pl: {
|
||||||
received: 0,
|
received: 0,
|
||||||
dropped: 0,
|
dropped: 0,
|
||||||
toString() {
|
toString() {
|
||||||
let packetsLostPercentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
let percentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
||||||
return packetsLostPercentage === "0.0" ? this.dropped.toString() : `${this.dropped} (${packetsLostPercentage}%)`;
|
return percentage.startsWith("0.") ? this.dropped.toString() : `${this.dropped} (${percentage}%)`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dt: {
|
dt: {
|
||||||
|
@ -127,8 +127,8 @@ export class StreamStatsCollector {
|
|||||||
received: 0,
|
received: 0,
|
||||||
dropped: 0,
|
dropped: 0,
|
||||||
toString() {
|
toString() {
|
||||||
const framesDroppedPercentage = (this.dropped * 100 / ((this.dropped + this.received) || 1)).toFixed(1);
|
const percentage = (this.dropped * 100 / ((this.dropped + this.received) || 1)).toFixed(1);
|
||||||
return framesDroppedPercentage === '0.0' ? this.dropped.toString() : `${this.dropped} (${framesDroppedPercentage}%)`;
|
return percentage.startsWith('0.') ? this.dropped.toString() : `${this.dropped} (${percentage}%)`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -136,8 +136,8 @@ export class StreamStatsCollector {
|
|||||||
received: 0,
|
received: 0,
|
||||||
dropped: 0,
|
dropped: 0,
|
||||||
toString() {
|
toString() {
|
||||||
const packetsLostPercentage = (this.dropped * 100 / ((this.dropped + this.received) || 1)).toFixed(1);
|
const percentage = (this.dropped * 100 / ((this.dropped + this.received) || 1)).toFixed(1);
|
||||||
return packetsLostPercentage === '0.0' ? this.dropped.toString() : `${this.dropped} (${packetsLostPercentage}%)`;
|
return percentage.startsWith('0.') ? this.dropped.toString() : `${this.dropped} (${percentage}%)`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user