Eyevinn / webrtc-player

WebRTC (recvonly) player
MIT License
87 stars 18 forks source link

fix: add callback for connecterror #63

Closed dnimon closed 9 months ago

dnimon commented 9 months ago

I 'm using this library with cloudflare stream webrtc. I noticed an issue where if I attempt to play the whep url before the whip side has started, then the player will get an exception inside the whep adapter connect and stop. The sequence in this case was getting a retry, it trying to do the connect again, and then the error occurred.

This change adds a new message that can be received as an event, in my case I'm using it to retry the connection after 5 seconds.