Re: How to construct a RTCPeerConnectionIceEvent?

On 2014-02-13 08:23, cowwoc wrote:
> On 13/02/2014 1:56 AM, Adam Bergkvist wrote:
>> On 2014-02-11 21:23, cowwoc wrote:
>>> Hi,
>>>
>>> http://www.w3.org/TR/webrtc/#rtcpeerconnectioniceevent states that
>>> RTCPeerConnectionIceEvent's constructor takes two arguments, but fails
>>> to define the first one ("type").
>>>
>>> What is the meaning of "type" and what are legal values?
>>
>> It defines the "event type", or the purpose, of an event that uses the
>> RTCPeerConnectionIceEvent interface. We only use the type
>> "icecandidate" at the moment. An example where we use different event
>> types, with the same interface, is the MediaStreamEvent where we have
>> "addstream" and "removestream" as different types to describe the
>> purpose of the event.
>>
>> /Adam
>>
> Hi Adam,
>
> You should document all legal values for "type". Furthermore, if you're
> going to list a constructor shouldn't I be able to instantiate this
> type? This doesn't seem to be the case at the moment, at least under
> Chrome.
>
> If, on the other hand, this isn't meant to be instantiable then you're
> going to have to document and justify that.

There's no set of legal values for type. The user agent only uses 
"icecandidate" at the moment, but a constructed 
RTCPeerConnectionIceEvent could use any string value that describes the 
purpose of the event. And yes, it should be constructable.

/Adam

Received on Thursday, 13 February 2014 07:55:30 UTC