Skip to content

Commit

Permalink
Reset list of videoTracks on WHIP DELETE
Browse files Browse the repository at this point in the history
We don't want a full delete so we can leave WHEP sessions connected
  • Loading branch information
Sean-Der committed Sep 18, 2024
1 parent 1e8d5cb commit f2fffcd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/webrtc/webrtc.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ func peerConnectionDisconnected(streamKey string, whepSessionId string) {
delete(stream.whepSessions, whepSessionId)
} else {
stream.hasWHIPClient.Store(false)
stream.videoTracks = nil
}

// Only delete stream if all WHEP Sessions are gone and have no WHIP Client
Expand Down

0 comments on commit f2fffcd

Please sign in to comment.