livekit / ingress

Ingest streams (RTMP/WHIP) or files (HLS, MP4) to LiveKit WebRTC
Apache License 2.0
76 stars 26 forks source link

Handle better the case where 2 publishers with the same ingress ID connect to the same ingress instance #125

Closed biglittlebigben closed 1 year ago

biglittlebigben commented 1 year ago

This generates a resourceID for rtmp sessions as well, and uses it to differentiate the different sessions, even if they belong to the same ingress.

This also make sure the ingress session terminates properly if the participant gets removed from the room (because another one if the same participant id joined, for instance).

This should prevent 2 ingress with the same ID to be started at the same time, even if they end up being handled by a different ingress server, as the room logic will terminate the older one of the 2 sessions. There is already explicit logic to terminate any active ingress session if the ingress gets modified to change the participant_id.