Closed smimram closed 2 years ago
The underlying websocket should be present on the webcast's instance:
webcast.socket.on("error", ...);
webcast.socket.on("close", ...);
Is that enough for you?
The thing is that most of the connection stuff is performed by the constructor, which makes it uneasy to reconnect. Let me propose something to you...
Actually the main problem is that we cannot catch error performed when constructor's code is executed. I propose #27 to solve this.
With the webcam example (#25), liquidsoap's harbor sometimes stops with
and in the browser's console we get
Webcast.js should provide a simple way to catch websocket's errors and initiate a new connection.