I am dealing with a RTCPeerConnection (pc) which has an event handler named onnegotiationneeded.
The "onnegotiationneeded" is triggered when a complete media stream is added or removed with pc.addStream or pc.removeStream.
Is it possible to tell inside the onnegotiationneeded function if it has been executed because the stream was added or removed? Because from reading the docs I couldn't find a state for that.
At the moment I am switching a flag when I do pc.addStream or pc.removeStream. This flag helps me to tell within onnegotiationneeded if it has been triggered by a stream remove or not.
But I was wondering if there is already such a property given by the browser's (Chrome 40 or Firefox 36) API?
Aucun commentaire:
Enregistrer un commentaire