mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Display errors
This commit is contained in:
parent
ca5dd4b34c
commit
f3ae21c5c1
@ -253,12 +253,23 @@ class CallWindow extends CustomEvents {
|
||||
config: this.callConfig()
|
||||
})
|
||||
|
||||
// Forward signals
|
||||
this.mainPeer.on("signal", data => {
|
||||
ws("call/signal", {
|
||||
|
||||
const type = data.hasOwnProperty("sdp") ? "SDP" : "CANDIDATE";
|
||||
|
||||
ws("calls/signal", {
|
||||
callID: this.callID,
|
||||
peerID: userID(),
|
||||
data: data
|
||||
type: type,
|
||||
data: type == "SDP" ? JSON.stringify(data) : JSON.stringify(data.candidate)
|
||||
})
|
||||
})
|
||||
|
||||
// Return errors
|
||||
this.mainPeer.on("error", err => {
|
||||
console.error("Peer error!", err);
|
||||
notify("An error occured while trying to connect!", "danger", 5)
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user