Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/eighty-snakes-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@epicgames-ps/lib-pixelstreamingfrontend-ue5.7": patch
---

Add guard against closed `peerConnection` in `generateStats`
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,13 @@ export class PeerConnectionController {
generateStats() {
this.peerConnection?.getStats().then((statsData: RTCStatsReport) => {
this.aggregatedStats.processStats(statsData);

this.onVideoStats(this.aggregatedStats);

// Connection might have been closed in the meantime
if (!this.peerConnection) {
return;
}

// Calculate latency using stats and video receivers and then call the handling function
const latencyInfo: LatencyInfo = this.latencyCalculator.calculate(
this.aggregatedStats,
Expand Down