文档中心
云信令(原实时消息)
API 参考
RtmClientEvents | Agora RTM JavaScript SDK API 参考
Agora RTM Web API Reference
Events
ConnectionStateChanged
ConnectionStateChanged: function
MessageFromPeer
MessageFromPeer: function
RemoteInvitationReceived
RemoteInvitationReceived: function
Properties
FallbackProxyConnected
FallbackProxyConnected: function
PeersOnlineStatusChanged
PeersOnlineStatusChanged: function
TokenExpired
TokenExpired: function
TokenPrivilegeWillExpire
TokenPrivilegeWillExpire: function
RtmClient 实例上的事件类型。 该接口中,函数属性的名称为事件名称,函数的参数为事件监听回调的传入参数。
监听点对点消息
client.on('MessageFromPeer', function (message, peerId) { // Your code. });