CH_SOLI_ALIVE = 0
+SOLI_DISCOVERY_SENT = 1
+
TURN_SERVER_ADDRESS = {}
SOLI_SIGNAL_ADDRESS = ""
CH_SOLI_ALIVE = 1
}
- }
+ if (SOLI_DISCOVERY_SENT == 0){
+
+ document.getElementById("discovery-reader").innerText = msg.data
+
+ SOLI_DISCOVERY_SENT = 1
+
+ } else {
- document.getElementById("soli-action-result").innerText = msg.data
+ document.getElementById("soli-action-result").innerText = msg.data
+
+ }
+
+ }
}
document.getElementById("soli-action-data").value = ""
- ws.send(JSON.stringify({command: 'roundtrip', data: u_query + ":"}))
+ ws.send(JSON.stringify({command: 'roundtrip', data: u_query }))
}
}
+async function sendDiscovery(){
+
+ if(CH_SOLI_ALIVE != 1){
+
+ alert("soli not opened, yet")
+
+ return
+ }
+
+ SOLI_DISCOVERY_SENT = 0
+
+ ws.send(JSON.stringify({command: 'roundtrip', data: "discovery:"}))
+
+}
async function initCCTV(){
console.log("init success")
- let req = "cctv:" + STREAMING_KEY
+ let req = "cctv:" + "default," + STREAMING_KEY
ws.send(JSON.stringify({command: 'roundtrip', data: req}))
}
<h1> Sorrylinus </h1>
+
<label for="soli-open-user-id">Soli ID</label>
<input type="text" id="soli-open-user-id">
<br>
<br>
<input type="button" onclick="openSoli()" value="open">
+ <pre id="discovery-reader"></pre>
+
+ <input type="button" onclick="sendDiscovery()" value="open">
+
<h3> Action </h3>
<label for="soli-action-data">Query</label>