wrtc.sendChatMessage() sends a text message. Supplied arguments are the address to send the message to and the text message.
wrtc.sendChatMessage(to, msg)
Nothing.
No events are raised by wrtc.sendChatMessage().
The client at the other end, receiving the text message will however get a wrtc.onChatMessage() event.
By replacing text message with a 0 an "iscomposing" message is sent, to alert other end you are typing your response.
wrtc.sendChatMessage("adam@foo.com", 0) sends an iscomposing message to adam@foo.com
wrtc.sendChatMessage("adam@foo.com", "Hello!")
sends text message "Hello!" to adam@foo.com
wrtc.getCalls("inGroupCall").forEach(function(call) {wrtc.sendChatMessage(call.getPartner(), "Hello!")})
send text message "Hello!" to everyone in current group call