simple-signal
simple-signal copied to clipboard
ERR_DATA_CHANNEL error will be throw by SimplePeer and application level code cannot catch it.
The SimpleSignalClient code will receive error randomly if another peer's website page refresh .
After checking this problem, we cannot catch this error.
Right now we can avoid this issue it by this way
Because we cannot catch this error, so I try to avoid to throw it when ERR_DATA_CHANNEL error happen.
So we can at least implement dynamically peer remove/add in the room.
The RTCErrorEvent will be throw as err in events/events.js if we don't handle peer('error'). So I put it in client code.
peer.on('error', (err)=>{
console.log(err)
})
This is issue is solve by this pull request https://github.com/t-mullen/simple-signal/pull/36