Re: [rtcweb] How to get a diff between the remote SDP in an established session and a new received SDP offer

Stefan Hakansson LK <stefan.lk.hakansson@ericsson.com> Tue, 10 July 2012 08:11 UTC

Return-Path: <stefan.lk.hakansson@ericsson.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 13F8721F85C9 for <rtcweb@ietfa.amsl.com>; Tue, 10 Jul 2012 01:11:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.977
X-Spam-Level:
X-Spam-Status: No, score=-5.977 tagged_above=-999 required=5 tests=[AWL=0.272, BAYES_00=-2.599, HELO_EQ_SE=0.35, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 96o3EUjrnJ37 for <rtcweb@ietfa.amsl.com>; Tue, 10 Jul 2012 01:11:28 -0700 (PDT)
Received: from mailgw2.ericsson.se (mailgw2.ericsson.se [193.180.251.37]) by ietfa.amsl.com (Postfix) with ESMTP id 9085E21F8615 for <rtcweb@ietf.org>; Tue, 10 Jul 2012 01:11:27 -0700 (PDT)
X-AuditID: c1b4fb25-b7fb66d000003bb6-20-4ffbe3c9a3a2
Received: from esessmw0256.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw2.ericsson.se (Symantec Mail Security) with SMTP id 55.87.15286.9C3EBFF4; Tue, 10 Jul 2012 10:11:54 +0200 (CEST)
Received: from [127.0.0.1] (153.88.115.8) by esessmw0256.eemea.ericsson.se (153.88.115.97) with Microsoft SMTP Server id 8.3.264.0; Tue, 10 Jul 2012 10:11:53 +0200
Message-ID: <4FFBE3C9.7050302@ericsson.com>
Date: Tue, 10 Jul 2012 10:11:53 +0200
From: Stefan Hakansson LK <stefan.lk.hakansson@ericsson.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: rtcweb@ietf.org
References: <CALiegfkKv8YBW1Lo0+bT0rBtheTsNde0+PTej+xZZmo7xPaYpA@mail.gmail.com> <CALiegf=KbUw9c81RWdTAiFGyd2ntwdaJ4BYsoGUduwE=JSbLLg@mail.gmail.com>
In-Reply-To: <CALiegf=KbUw9c81RWdTAiFGyd2ntwdaJ4BYsoGUduwE=JSbLLg@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJJMWRmVeSWpSXmKPExsUyM+Jvre6px7/9DSbNY7NY+6+d3YHRY8mS n0wBjFFcNimpOZllqUX6dglcGX8er2IseCVQcWzKJ+YGxg28XYycHBICJhIPPrYxQdhiEhfu rWcDsYUETjFKdP2t6mLkArKXM0qcu7eSGSTBK6AtcXfhI3YQm0VAVeLsxyeMIDabgI3E2u4p QIM4OEQFwiSm72SHKBeUODnzCQuILSIgLLH1VS9YibBAuUTTOhOI8VMZJdYcmwA2nlMgUOLR q+NgNzALWEgsfnOQHcKWl2jeOpsZ4jZdiXev77FOYBSYhWTFLCQts5C0LGBkXsUonJuYmZNe bqSXWpSZXFycn6dXnLqJERh8B7f8Vt3BeOecyCFGaQ4WJXFe6617/IUE0hNLUrNTUwtSi+KL SnNSiw8xMnFwSjUwav0tYZM875bz2bREJSdqcof3Q4uIjB26wjoy5vMFeyR/GpjnrIs4nqr/ NU771OMS1nNqSvOj83dzhnbyM7HofpbMvSyauUC/SOOIZK2U5LKAKnmNi0ucgqrKI6aZHc2J LRZb5iiZcXeV7cFVm3ZNebRpi7nBmwctM1zCF3ifmVPo+bX54RwlluKMREMt5qLiRAA+rqK/ DAIAAA==
Subject: Re: [rtcweb] How to get a diff between the remote SDP in an established session and a new received SDP offer
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Jul 2012 08:11:31 -0000

On 07/06/2012 09:33 AM, Iñaki Baz Castillo wrote:
> Hi, I would really appreciate some explanation about this subject.
> Basically the aim of my question is to imitate the behavior of
> existing chat+audio+video clients in which the session is initially
> started with just audio, and video is added later (by asking for user
> consent).
>
> I hope that raw parsing of the received SDP is not needed for achieving this :)

The API is designed around MediaStreams and MediaStream tracks. So, for 
the app receiving a MediaStream that travels from another app using a 
PeerConnection, any change would (if you do not do SDP parsing!) be 
shown by events such as "addstream"/"removestream" (for PeerConnection) 
"addtrack"/"removetrack" (for a MediaStream) and "mute"/"unmute" (for a 
MediaStream track). Could not these events be used to trigger change at 
the receiving app (e.g. if the incoming video track changes to "unmute" 
the outgoing one is enabled in response)?

In addition, the app's can signal anything they would like to using 
proprietary signaling ("I would like to enable video, OK?").

Br,
Stefan

>
> Regards.
>
>
> 2012/7/4 Iñaki Baz Castillo <ibc@aliax.net>:
>> Hi, let's assume I have an established audio session. Later the remote
>> sends me a new SDP offer (let's say a SIP re-INVITE) and I want to
>> analyze what is new in the new SDP (in order to ask the user for
>> consent). So for example when the new SDP arrives I need to know
>> whether it contains audio and video or whatever.
>>
>> With the current JSEP API I see no way. The only I can do with the new
>> received SDP is:
>>
>>    pc.setRemoteDescription(SDP_OFFER, REMOTE_SDP_TEXT)
>>
>> but this would alter my multimedia session before I can ask my user
>> for consent. Do I miss something?
>>
>> And I would also like to know whether the received SDP contains
>> dissabled streams (i.e. a video stream with port 0) before accepting
>> it. Basically I want a mechanism for getting a diff between the
>> existing remote SDP and the new received one.
>>
>> --
>> Iñaki Baz Castillo
>> <ibc@aliax.net>
>
>
>