Receiving signals in a session
To start receiving all signals sent in a session, add an event listener for the signal event, dispatched by the Session object:
You can also listen for only signals set to a specific type. (You can optionally set the type of a signal when you send a signal.) Register an event listener for the signal:type event, replacing "type" with the type string. For example, the following listens for signals of type "foo":
You can compare the from property of the event object with the connection property of the Session object to see if the signal was sent by your client or another:
Note that you can use a REST API call to send a signal from your server, instead of from a client connected to the session. In this case, the from property of the event object is set to null.
Signaling
Learn how to use Vonage Video API signaling to build robust messaging into your Android, iOS, or web application. With signaling, users can send messages, control robots, and more!