Closed js-beaulieu closed 5 years ago
This happens to me sometimes. Thus, I had to put this code inside "session.connected" to make it works.
var pc = session.pc;
pc.oniceconnectionstatechange = function() {
if(pc.iceConnectionState == 'disconnected') {
session.hangup();
}
}
@marvicrm we'd love to accept your changes. would you submit a pull request? we can merge your fix into master.
added in webrtc-v2.js
> WebRTC Phone Auto Hangup and Goodbye on Unload
I am facing an issue where sometimes the ended() callback isn't called for the third party on disconnection. I suspect this has to do with this... let's say ungraceful (?) disconnections... How would one go and detect such situations?