w3c / webrtc-ice

Extension to the RTCIceTransport interface defined in WebRTC 1.0
https://w3c.github.io/webrtc-ice/
Other
9 stars 14 forks source link

Why is a new event type "localcandidate" introduced here? #16

Closed alvestrand closed 6 years ago

alvestrand commented 6 years ago

This seems to be exactly the same as the Peerconnection "icecandidate" event. Why does it have a new name in this specification?

henbos commented 6 years ago

I'm guessing because you should be able to use this stuff without having an RTCPeerConnection. So if webrtc-ice were adopted, webrtc-pc would no longer need RTCPeerConnection.onicecandidate. Assuming they are the same.

aboba commented 6 years ago

@alvestrand Both the RTCPeerConnection and RTCIceTransport have an icecandidate event type to provide an RTCIceCandidate. For RTCPeerConnection the RTCPeerConnectionIceEvent interface is used, along with EventHandler onicecandidate. RTCIceTransport has EventHandler onlocalcandidate. However, the terminology section references WebRTC-PC's icecandidateerror, RTCPeerConnectionIceEvent and RTCPeerConnectionIceErrorEvent.

So it appears that the only difference is the name of the EventHandler.