Re: [Bug 17249] New: SdpType usage must be chosen

My simple answer is the SessionDescription gets used a few places - often you need the type info when the SessionDescription is consumed. Any time SessionDescription is produced, it is trivial for browser to add the type info. It's really no extra work for browser to put it in the SessionDescription. If the browser does not, then the application has to keep track of it. So in the name of make it easier for the JS programmer, and no real extra work for browsers, my preference is put type in SessionDescription. If the application wants to keep track of the type outside of the SessionDescription, it certainly can do that even if the type is in the SessionDescription.

My more complex answer is that I think it was a design mistake in SDP that one can't tell if the type of the SDP from just looking at the SDP. Putting it in SessionDescription helps correct that mistake and makes it easier for the browser to produce reasonable error messages if the wrong type of SDP is passed in. Detecting error and reporting rational error messages is going to be hard and this will help. 

My 2 cents - and of course either will work - both would be bad. 



On May 30, 2012, at 8:15 AM, bugzilla@jessica.w3.org wrote:

> https://www.w3.org/Bugs/Public/show_bug.cgi?id=17249
> 
>           Summary: SdpType usage must be chosen
>           Product: WebRTC Working Group
>           Version: unspecified
>          Platform: All
>        OS/Version: All
>            Status: NEW
>          Severity: normal
>          Priority: P2
>         Component: WebRTC API
>        AssignedTo: public-webrtc@w3.org
>        ReportedBy: harald@alvestrand.no
>                CC: public-webrtc@w3.org
> 
> 
> At the moment (May 30), the spec contains:
> 
> [Constructor (DOMString description)]
> interface SessionDescription {
>    attribute SdpType   type;
>    attribute DOMString sdp;
>    stringifier DOMString ();
> };
> 
> and in PeerConnection:
> 
>    void        setLocalDescription (SdpType action, SessionDescription
> description);
>    void        setRemoteDescription (SdpType action, SessionDescription
> description);
> 
> The SdpType should either be a property of a SessionDescription or an argument
> to to Set*Description, not both.
> 
> Either we get an argument in favour of one or the other, or we should flip a
> coin.
> 
> -- 
> Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
> You are the assignee for the bug.
> 

Received on Thursday, 31 May 2012 18:49:56 UTC