On Wed, 12 Jun 2013, Lance Stout wrote:
So, I've implemented and have been working with this in stanza.io (a new JS
websocket XMPP client lib) for WebRTC signaling. (Don't worry, I'm also working
with Fippo to get proper Jingle to work too).
The primary benefit to this is that I don't have to parse SDP in the browser to
create Jingle stanzas, and then translate Jingle back to SDP. However, what is
documented here doesn't go far enough to provide that benefit -- it still
requires some SDP parsing on the receiving end to extract the relevant bits
needed for WebRTC.
+1 -- but I think it is quite easy to make sox more usable for peopel who
don't have the sip parser but only the sdp parser.
So, what I've been using has the form:
<message>
<sox xmlns="http://stanza.io/protocol/sox"
sid="..."
-> <thread/>
type="offer|answer|candidate"
add "bye" and possibly pranswer.
[label="..." id="..."]>
...SDP blob...
</sox>
</message>
Where sid is the user generated session ID, and label and id are for ICE
candidate updates. The browser APIs helpfully provide the label and id values.
Since they are included as attributes, there is no need for parsing the SDP
blob by the receiver.
(addIceCandidate) is horribly inconsistent. It should take another sdp
blob (consisting of a=mid lines, ice parameters, multiple candidates) etc.