Fix candidates format

This commit is contained in:
Pierre HUBERT 2020-04-12 15:23:46 +02:00
parent 0efd15deaa
commit a5061dd7ef

View File

@ -92,9 +92,16 @@ document.addEventListener("userLeftCall", (e) => {
document.addEventListener("newCallSignal", (e) => { document.addEventListener("newCallSignal", (e) => {
const detail = e.detail const detail = e.detail
let signal = detail.data
// Fix candidate format
if(signal.hasOwnProperty("candidate"))
signal = {
candidate: signal
}
if(OpenConversations.has(detail.callID)) if(OpenConversations.has(detail.callID))
OpenConversations.get(detail.callID).NewSignal(detail.peerID, detail.data) OpenConversations.get(detail.callID).NewSignal(detail.peerID, signal)
}); });
document.addEventListener("callPeerReady", (e) => { document.addEventListener("callPeerReady", (e) => {