Add support for Signal API
Closed this issue · 1 comments
ggarber commented
This is a request for comments regarding the API for upcoming platform functionality. The platform functionality is not generally available at the moment and there is no guarantee it will be released in any form.
Send a signal
You can send a signal to all the participants in an OpenTok Session using the
opentok.signal(sessionId, connectionId, payload, callback)
method.
// To send a signal to a specific connection in the session
opentok.signal(sessionId, connectionId, { 'type': 'chat', 'data': 'Hello!' }, function(error) {
if (error) return console.log("error:", error);
});
// To send the signal to all the connections in the session
opentok.signal(sessionId, null, { 'type': 'chat', 'data': 'Hello!' }, function(error) {
if (error) return console.log("error:", error);
});
This is the server-side equivalent to the signal() method in the OpenTok client SDKs. See
https://www.tokbox.com/developer/guides/signaling/js/.