'How to access callbacks from the JS client when certain events happen in Ant Media Server?

Is there an event / callback that is accessible from the JS client to know when certain events like publish timeout happens?



Solution 1:[1]

Yes, there is an event/callback message on WebSocket object. You can use callbackError section like in this link: https://github.com/ant-media/StreamApp/blob/master/src/main/webapp/index.html#L735

You can check this guide for all WebSocket messages: https://github.com/ant-media/Ant-Media-Server/wiki/WebRTC-WebSocket-Messaging-Reference#websocket-error-callbacks

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Selim Emre Toy