====== adv.sendWrtcCmd() ====== wrtc.adv.sendWrtcCmd() is used to transmit data to remote user using [[ixnx:wrtc:rtcgate:start|RTCgate]] signaling channel. It is intended to send small amounts of user commands and arguments to a remote client. For large amounts of data use [[ixnx:wrtc:js:api:call:adv.senddata|data channel]] instead. ===== Arguments ===== wrtc.adv.sendWrtcCmd(to, data) * to - string containing addressName of recepient to send data to. * data - string or JSON data containing user command to send. ===== Returns ===== Nothing. Will trigger [[ixnx:wrtc:js:api:wrtc:onwrtccmd|wrtc.onWrtcCmd()]] at receiving end. ===== Usage ===== Please understand that wrtc.adv.sendWrtcCmd() may fail to deliver commands to remote clients connected to remote webrtc servers. There is no feedback on failure. If you are currently in call with the recepient then you should use [[ixnx:wrtc:js:api:call:adv.sendwrtccmd|call.adv.sendWrtcCmd()]] instead of wrtc.adv.sendWrtcCmd() to allow RTCgate use any SIP connections already made. This increases the reliability of the transfer. ===== Example ===== wrtc.adv.sendWrtcCmd("johndoe", {cmd:"yourcmd", data:"yourdata"}); ===== See also ===== [[ixnx:wrtc:js:api:call:adv.sendwrtccmd|call.adv.sendWrtcCmd()]] [[ixnx:wrtc:js:api:wrtc:onwrtccmd|wrtc.onWrtcCmd()]]