Hi guys,
is there a way to know when the publisher is connected via webrtc on web browser?
A listener on switching connection events would be useful.
I tried with: publisher.stream.getRTCPeerConnection().oniceconnectionstatechange = …
but the openvidu SDK no longer works because I assume you use that method too.
As a general rule it is now discourage to use the on... method version, as you could be getting unwanted side effects as you have come across. That being said, openvidu-browser library shouldn’t be broken after you add that listener, because as I have already stated, there is no oniceconnectionstatechange call in all of OpenVidu repository. So yours should be the only call to that method in your application. You can check it by yourself with this GitHub search: Search · oniceconnectionstatechange · GitHub
I have tested this solution but is not working.
If I comment the addEventListener method there is no error, otherwise the publisher goes into accessDenied error and I don’t know why.