X-Git-Url: https://git.kengrimes.com/?p=henge%2Fkiak.git;a=blobdiff_plain;f=client.js;h=f38f3ab5050299997d686635c81b1d0e1ba8c45e;hp=2aa4950e9dcfdde4bfbd1cfa53146ca087ed9006;hb=bf0ef83964741dcd64d27a8da651e65beba7e451;hpb=5da8f7e044a781c15567b43ee9acc07444605015
diff --git a/client.js b/client.js
index 2aa4950..f38f3ab 100644
--- a/client.js
+++ b/client.js
@@ -1,8 +1,6 @@
const body = document.createElement('body')
const root = document.createElement('div')
document.title = "Strapp.io Client"
-body.appendChild(root)
-document.body = body
const conf = {"iceServers": [{ "urls": "stun:stun.1.google.com:19302" }] }
let dataChannel
@@ -179,10 +177,17 @@ getPublicKey().then((cpk) => {
/* Start data channel */
dataChannel = cpc.createDataChannel("sendChannel");
dataChannel.onmessage = (msg) => {
- console.log(msg.data)
+ /* Get mediaStream from host and add it to the video */
+ let video = document.querySelector('')
}
dataChannel.onopen = () => {
dataChannel.send(`Hi from the Client`)
+ document.write(' ')
}
})
+document.addEventListener('DOMContentLoaded', () => {
+
+ document.body.innerHTML = ``
+
+});