func(url, clientPubKey, resolve, reject )
})
}
-/* If https connection, should be already defined. If not https,*/
+
+/* TODO: duplicate in both client.js and host.js */
function getPublicKey() {
/* Check local storage for public key */
if (window.localStorage.getItem('public-key') === undefined) {
/* Poll for answer */
return pollServer(window.location, offer, pollServerTimeout)
}).then((answer) => {
- /* TODO: Extract sdp from answer ?*/
console.log(answer)
- /* State machine to parse answer */
+ /* TODO: State machine to parse answer */
cpc.setRemoteDescription(answer.sdp)
})