WebSocket format stream information
WebSocket stream information
Connecting to either the javascript or JSON format stream information URLs with a WebSocket will enable WebSocket mode stream information.
This mode behaves a bit differently: instead of a single response, the socket is kept open and receives an update whenever the stream status changes. If the stream is online/active, the received data is identical to the JSON format. If the stream is in any other state, the received data is an object containing an "error" member variable, which has a value with a human-readable stream status. In the Pro version, the "on_error" value can also be set to a configurable value.
The WebSocket will persist through stream stops/starts and keep sending updates until either it is closed or the entire server shuts down.