Re: Clarification requested: Callback in "simple API"

Hi Harald

Thank you for taking the time to study the proposal.

On 03/27/2012 01:43 PM, Harald Alvestrand wrote:
> A clarification request....
>
> the signalling callback in jsep-easy1 is described as:
>
> ThesignalingCallbackargument is a method that will be invoked when the
> user agent needs to send a message to the other host over the signaling
> channel. When the callback is invoked, convey its first argument (a
> string) to the other peer using whatever method is being used by the Web
> application to relay signaling messages.
>
> However, the message description says:
>
> The|PeerConnection|id
> <http://lists.w3.org/Archives/Public/public-webrtc/2012Mar/att-0049/webrtc_jsep_easy1-2012-03-14.html#peerconnection-id>is
> included in every generated signaling message to differentiate locally
> produces signaling messages from remotely produced ones.
>
> and:
>
>  1.
>
>     Iftypeis acase-sensitivematch to "|OFFER|", andlocalis true, then
>     instruct the|PeerConnection|SDP Agent
>     <http://lists.w3.org/Archives/Public/public-webrtc/2012Mar/att-0049/webrtc_jsep_easy1-2012-03-14.html#peerconnection-sdp-agent>to
>     processsdpas a local description of type offer and abort these steps.
>
> How is it intended that the recipient of the signalingCallback know when
> to send the message to the other host, and when to process it locally?
>

Messages dispatched via the signalingCallback should always be 
transported to the other peer. However, if you modify the message you 
need to call processSignalingMessage() to make PeerConnection aware of 
the changes, and then send it.

[signalingCallback message]
|
|----> modifyMessage(message)
|       |
|<---- processSignalingMessage(message)
|
send(message)

[1] has an example of this procedure in JavaScript code.

How and when you can modify a signaling message is up to the protocol 
spec to define.

BR
Adam

[1] http://lists.w3.org/Archives/Public/public-webrtc/2012Mar/0071.html

Received on Wednesday, 28 March 2012 09:28:39 UTC