Re: [rtcweb] Requesting "SDP or not SDP" debate to be re-opened

"Matthew Kaufman (SKYPE)" <> Wed, 19 June 2013 18:05 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C5EE321F997F for <>; Wed, 19 Jun 2013 11:05:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[AWL=-0.000, BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id TfagljPAg9ea for <>; Wed, 19 Jun 2013 11:05:48 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 5B80921F9E2A for <>; Wed, 19 Jun 2013 11:05:47 -0700 (PDT)
Received: from ( by ( with Microsoft SMTP Server (TLS) id 15.0.707.0; Wed, 19 Jun 2013 18:05:46 +0000
Received: from ( by ( with Microsoft SMTP Server (TLS) id 15.0.707.0 via Frontend Transport; Wed, 19 Jun 2013 18:05:46 +0000
Received: from ([]) by ([]) with mapi id 14.03.0136.001; Wed, 19 Jun 2013 18:04:33 +0000
From: "Matthew Kaufman (SKYPE)" <>
To: Peter Thatcher <>
Thread-Topic: [rtcweb] Requesting "SDP or not SDP" debate to be re-opened
Date: Wed, 19 Jun 2013 18:04:32 +0000
Message-ID: <>
References: <> <> <> <> <> <> <> <> <> <>, <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
Content-Type: multipart/alternative; boundary="_000_0867CEB429834B4892A32E96CF74D8CDskypenet_"
MIME-Version: 1.0
X-Forefront-Antispam-Report: CIP:; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(199002)(24454002)(51704005)(51444003)(189002)(377454003)(51856001)(30436002)(81342001)(16406001)(53806001)(69226001)(47736001)(47446002)(46102001)(77096001)(54356001)(74876001)(76796001)(74662001)(49866001)(20776003)(31966008)(59766001)(65816001)(36756003)(6806003)(47976001)(71186001)(50986001)(81542001)(74502001)(33656001)(44976003)(77982001)(79102001)(74706001)(512934002)(74366001)(56816003)(56776001)(16236675002)(54316002)(76482001)(4396001)(63696002)(76786001)(80022001); DIR:OUT; SFP:; SCL:1; SRVR:BY2FFO11HUB015;; CLIP:; RD:InfoDomainNonexistent; A:1; MX:1; LANG:en;
X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY)
X-Forefront-PRVS: 08828D20BC
Cc: "" <>
Subject: Re: [rtcweb] Requesting "SDP or not SDP" debate to be re-opened
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 19 Jun 2013 18:05:52 -0000

All of what you say below is true, but this is entirely backwards from how web page authors are supposed to interact with the browser.

Imagine if displaying JPEG images in the page were equally possible, if you wanted to munge a bunch of strings, but otherwise you were out of luck.

Matthew Kaufman

(Sent from my iPhone)

On Jun 19, 2013, at 9:41 AM, "Peter Thatcher" <<>> wrote:

On Wed, Jun 19, 2013 at 9:10 AM, Iñaki Baz Castillo <<>> wrote:
Hi Peter, for now just some comments (I agree that more use cases and
other considerations must be provided):

>> I don't think that the discussion is just about "SDP O/A usage in the
>> API". We don't want a replacement for SDP, nor a new representation of
>> SDP, nor to deal with blob strings between the JS layer and the WebRTC
>> layer.
> Please at least agree with Christer that this is about the API, not about
> the signalling wire format.  The API already allows whatever signalling wire
> format you want,

IMHO that is not entirely true.

First of all, whichever the signaling protocol is, it must accomplish
with SDP O/A semantics (since it must carry a SDP and receive a SDP to
establish the communication).

API calls must use the SDP O/A, but what goes on the wire doesn't have to be.  With enough SDP hackery, you can do whatever you want over the wire, including not use O/A semantics.

Second: Indeed the current spec does not mandate what should be sent
in the wire. In practice that means we can use SIP over WebSocket,
XMPP/Jingle over HTTP, or whatever. But in practice it also means that
we must send a SDP in the wire. The SDP blob string can be
hex-encoded/escaped/mangled/whatever by the JS app, but the SDP blob
string generated by PeerConnection-A should arrive to

A sufficiently smart chunk of JS could call setLocalDescription/setRemoteDescription with SDP that it completely created itself, and send whatever it wants over the wire.

And since such a SDP is generated by the WebRTC
stack and passed to the JS as an unmanageable blob string, the JS app
cannot properly deal with it.

The JS parse the SDP from createOffer/createAnswer, get the info it needs, make decisions and then serialize different SDP back down in setLocalDescription/setRemoteDescription.  It's terribly ugly, but it works.

So, currently WebRTC does not mandate the signaling protocol
in-the-wire, but it does mandate the media signaling protocol
in-the-wire (you need to pass a working SDP to the remote, sure),
something that constrains the signaling protocol itself.

It does not mandate SDP over the wire.  It's possible to write a JS app that gets everything working with no SDP on the wire.  It's anything but pretty, but it works.

> and everything you mention from here on out is just the
> API.  So please just say to Christer "yes, this is all about the API".  It
> will make the rest of the discussion much more clear.

> Ok, this is all about the API :)

>> In short we want something like a JS wrapper of the native
>> WebRTC API,
> I work on the WebRTC implementation in Chrome, and I don't know what you
> mean by "native WebRTC API".  Such a thing does not really exist.  The
> implementation has three different layers of abstraction, each of which you
> might be referring to, but none of them which will give you what you want.
> The highest level uses SDP.  The lowest level gives you media bits, but no
> ICE, SRTP, DTLS, or SCTP.  The middle layer gives you all those things
> without SDP, but it still uses an abstract offer/answer for transport and
> RTP setup (and even has a Jingle implementation on top of that).  None of
> those give you what you want.  The "native WebRTC API" that you want to wrap
> doesn't exist.

> Ok, IMHO nobody is still requesting a specific JS API but just
> describing the features and capabilities such an API must provide. The
> "similar to native WebRTC API" is just a comment to help understanding
> what we mean, but of course each browser is free to implement its
> native API(s) as it prefers so the "JS wrapper" concept does not make
> sense.

But you can't say "similar to native WebRTC API" because no such thing exists.  You can't be similar to something that doesn't exist :).

>> to directly manage media/transport parameters and media
>> streams without having to pass a monolithic and unmanageable SDP blob
>> between the JS and the WebRTC layer.
> That boils down to "the same power of the current API, without going through
> SDP".  I think that's a clear requirement.  So why don't you just say that?
> Would save everyone a lot of reading and misunderstanding.

> You are right.

>> calls to get the required media parameters, the JS can send them to
>> the remote peer in the way it prefers (which may be via a SDP created
>> by the JS app, or via an AJAX request for sending codecs/media-types
>> info followed by a WebSocket connection for sending ICE candidates one
>> by one, or serialized in JSON via a previously open DataChannel
>> session... or whatever mechanism available in the Web and browsers).
> You already have that.

> Can I first send my codecs list, then (once the peer notifies me
> codecs compatibility) send the codecs preference order, then my ICE
> candidates and later (not just when ICE process terminates) signal the
> peer a "OK" message so we both start the multimedia audio/video/data
> communication, all of this with the current API?

I think so, yes.

> (I mean without parsing the SDP blob and splitting it into blob fragments).

Maybe... I don't know for sure.  But generally, anything beyond the most basic uses of the API requires at least some SDP hackery, and advanced uses require a lot.

Best regards.

Iñaki Baz Castillo

rtcweb mailing list<>