Skip to content

Commit

Permalink
fix(TPC) fix getting video SSRCs if local one is not present yet
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul authored and damencho committed Sep 4, 2024
1 parent 09333fb commit 4116614
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/RTC/TraceablePeerConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ TraceablePeerConnection.prototype.getTrackBySSRC = function(ssrc) {
throw new Error(`SSRC ${ssrc} is not a number`);
}
for (const localTrack of this.localTracks.values()) {
const { ssrcs } = this.localSSRCs.get(localTrack.rtcId);
const { ssrcs } = this.localSSRCs.get(localTrack.rtcId) ?? { ssrcs: [] };

if (ssrcs.find(localSsrc => Number(localSsrc) === ssrc)) {
return localTrack;
Expand Down

0 comments on commit 4116614

Please sign in to comment.