Skip to content

Commit a745c67

Browse files
authored
Fix call.collectCallStats() (#2480)
Regressed by #2352 (you can just use RTCStatsReport as an iterator directly (which was was what that code was doing before) which uses entries( which gives you key/value pairs, but using forEach gives you just the value.
1 parent 55bec4f commit a745c67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/webrtc/call.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -708,9 +708,9 @@ export class MatrixCall extends TypedEventEmitter<CallEvent, CallEventHandlerMap
708708

709709
const statsReport = await this.peerConn.getStats();
710710
const stats = [];
711-
statsReport.forEach(item => {
712-
stats.push(item[1]);
713-
});
711+
for (const item of statsReport.values()) {
712+
stats.push(item);
713+
}
714714

715715
return stats;
716716
}

0 commit comments

Comments
 (0)