❔ Blazor JS Interop - Return RTCPeerConnection from js to Blazor in order to close it
Hi, I've quite a complex task: In my Blazor application I use javascript to read webrtc data produced by https://github.com/deepch/RTSPtoWeb, which basically take streams from a bunch of RTSP IP Cameras and publishes them as webrtc streams.
Now, everything works fine, the only problem I have is that, after the webrtc connection is open, at a certain point (e.g. if the user leaves the page) I need to close such connection.
And in order to close it, I suppose I need to return the created 'webrtc' object to the calling Blazor method, so that Blazor side I can close the RTCPeerCOnnection when needed. But Blazor side, I don't know which object I need to use to "store" the result.