mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-18 00:55:40 +00:00
Use state from the WebRTC stat reports for RTT
Previous fix #844d84b doesn't work in Chrome, so this is another method
for better FF/Chrome compatibility.
This commit is contained in:
parent
14de2a1790
commit
6fff575817
1 changed files with 6 additions and 2 deletions
|
|
@ -642,8 +642,12 @@ stats.modules = [
|
|||
);
|
||||
SET_CODEC = 1;
|
||||
}
|
||||
const { selected, currentRoundTripTime, type, kind } = report;
|
||||
if (selected && currentRoundTripTime !== undefined) {
|
||||
const { selected, state, currentRoundTripTime, type, kind } =
|
||||
report;
|
||||
if (
|
||||
(selected || state === "succeeded") &&
|
||||
currentRoundTripTime !== undefined
|
||||
) {
|
||||
WEBRTC_STATS_RTT(currentRoundTripTime * 1000);
|
||||
}
|
||||
if (type === "inbound-rtp" && kind === "video") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue