openwebrtc-examples icon indicating copy to clipboard operation
openwebrtc-examples copied to clipboard

Peer terminate call event by WebRTC on iOS

Open oney opened this issue 10 years ago • 1 comments

I have run ios/NativeDemo project on my iPhone, and it worked perfectly. However, I find that when my WebRTC peer taps 'Hangup' button to terminate the call, I will be noticed this thing by EventSource, not WebRTC itself. In Javascript, we have WebRTC disconnect event to know when the peer disconnects like below.

pc.oniceconnectionstatechange = function() {
    if(pc.iceConnectionState == 'disconnected') {
        console.log('Disconnected');
    }
}

So, I think there should be a way to implement it like Javascript.

oney avatar Apr 26 '15 03:04 oney

There is an ice-connection-state property on OwrSession. It may get split into connection-state and gathering-state soon as in ORTC as that is more agnostic to the connection establishment protocols used.

superdump avatar Apr 26 '15 06:04 superdump