简体   繁体   English

Ant媒体服务器发生某些事件时,如何从JS客户端访问回调?

[英]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?是否有可从 JS 客户端访问的事件/回调以了解某些事件(如发布超时)何时发生?

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是的,WebSocket object 上有一个事件/回调消息。您可以使用此链接中的callbackError部分: 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您可以查看本指南以了解所有 WebSocket 消息: https://github.com/ant-media/Ant-Media-Server/wiki/WebRTC-WebSocket-Messaging-Reference#websocket-error-callbacks

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 SignalR 中监听从服务器到客户端的所有回调? - How to listen to all callbacks from the server to client in SignalR? 除非发生某些事件,否则如何使所有用户无法访问 React 中的路由 - How to make a route in React inaccessible to all users except when certain events happen 如何通过客户端JavaScript从我的node.js服务器访问数据? - How do I access data from my node.js server from client javascript? 在客户端中止 XHR 请求时会发生什么服务器端? - What server side happen when abort a XHR request in client? 如何从客户端访问服务器端WebControl? - How to access a server side WebControl from Client? 如何在 js/googlescript 中访问从客户端到服务器端的对象数组中传递的变量 - How do I access a variable passed in an object array from client side to server side in js/googlescript 如何允许客户端从 Node.js + Express 服务器访问任何 static 文件? - How to allow client to access any static file from Node.js + Express server? 即使事件循环中没有要执行的回调,Node.js Web服务器如何保持运行? - How does A Node.js Web Server Keep Running Even When There Are No Callbacks To Be Executed In The Event Loop? 如何显示Elasticsearch JS客户端返回的对象中的某些字段? - How to display certain fields from the object returned by elasticsearch JS client? 如何通过使用 js/ts 停止渲染某一段代码,就像我们在 angular 中使用 *ngIf 时发生的一样 - How to stop rendering of a certain section of code by using js/ts exactly like what happen when we use *ngIf in angular
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM