====== (nonsecure) websocket ====== By default wrtc_kit uses secure, encrypted wss websockets. If you for some reason want to use the older, nonencrypted ws websocket standard you can do so using our webrtcDemo Windows app. Even though webpages are no longer allowed to open ws connections Windows apps can still do so. Our solution is to make the webrtcDemo app open the ws connection and forward everything received through it to the demo app running in its webview. To make wrtc_kit use app ws instead of wss add wrtc.i.forceWs = "webview" to [[ixnx:wrtc:js:api:wrtc:init|wrtc.init()]] This takes care of opening the websocket and sending data through it. To be able to receive things and detect errors you need to add the following to your demo client: function onMessageFromWebView(event) { var msg = event.data; var obj; try {obj = JSON.parse(msg)} catch(e) {wrtc.moduleLog("democlient", "onMessageFromWebView parse error " + msg.substring(0, 50));} if ((obj) && (obj.cmd)) { switch (obj.cmd) { case "ws_rcv": wrtc.get("ws").onmessage(obj.msg); break; case "ws_error": wrtc.get("ws").onerror(obj.msg); break; } } } window.chrome.webview.addEventListener('message', onMessageFromWebView); wrtc_kit has its own encryption layer that can be turned on by supplying a wskopen value in the REST token.