Re: [rtcweb] Additional requirement - audio-only communication

Justin Uberti <juberti@google.com> Fri, 26 August 2011 14:55 UTC

Return-Path: <juberti@google.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 5731C21F85AB for <rtcweb@ietfa.amsl.com>; Fri, 26 Aug 2011 07:55:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.266
X-Spam-Level:
X-Spam-Status: No, score=-105.266 tagged_above=-999 required=5 tests=[AWL=0.144, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, GB_I_INVITATION=-2, HTML_MESSAGE=0.001, J_CHICKENPOX_15=0.6, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_MED=-4, SARE_HTML_USL_OBFU=1.666, USER_IN_WHITELIST=-100]
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 rs9JYBehKL0D for <rtcweb@ietfa.amsl.com>; Fri, 26 Aug 2011 07:55:35 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by ietfa.amsl.com (Postfix) with ESMTP id 8BF2621F8500 for <rtcweb@ietf.org>; Fri, 26 Aug 2011 07:55:34 -0700 (PDT)
Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out.google.com with ESMTP id p7QEunuD012958 for <rtcweb@ietf.org>; Fri, 26 Aug 2011 07:56:49 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1314370610; bh=DXrdCwzc/ke6gUJarI7ZLMBPRC8=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=bLFmKK882zQ3eC0D0GsVuWswI2fzANS9jaUFxdr25f0hwXM9Pu/GifdafI/08IE8u 3CvznULYvVDBkovu8X8ng==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=dkim-signature:mime-version:in-reply-to:references:from:date: message-id:subject:to:cc:content-type:x-system-of-record; b=b6PY1fMouHQmNaz9EhODYmhrab4AZjg+hCyciFxUKK6HNA8wD2nfvG+AttdZrKJl4 yRyvofeY5RvQ67oqCAaEQ==
Received: from qyk36 (qyk36.prod.google.com [10.241.83.164]) by wpaz5.hot.corp.google.com with ESMTP id p7QEuWM6015174 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <rtcweb@ietf.org>; Fri, 26 Aug 2011 07:56:48 -0700
Received: by qyk36 with SMTP id 36so496591qyk.9 for <rtcweb@ietf.org>; Fri, 26 Aug 2011 07:56:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=ntcQ86htyjUdK/oFTk3pZjRDiw3AmdYK+KN91nJo/co=; b=tzD1EUSNBzsDrASA9u23kuT32kM4UUVfjZHP6VxkNLeE6h/B2hndLFjjl66eQ3Xn+T tZijhOtgYKI8H+QgSPuA==
Received: by 10.42.245.5 with SMTP id ls5mr1175854icb.149.1314370606517; Fri, 26 Aug 2011 07:56:46 -0700 (PDT)
Received: by 10.42.245.5 with SMTP id ls5mr1175849icb.149.1314370606136; Fri, 26 Aug 2011 07:56:46 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.231.32.133 with HTTP; Fri, 26 Aug 2011 07:56:26 -0700 (PDT)
In-Reply-To: <4E57AC5C.1020406@ericsson.com>
References: <4E539A1F.109@alvestrand.no> <4E53B80C.20304@ericsson.com> <4E53E0C8.6010304@alvestrand.no> <BBF498F2D030E84AB1179E24D1AC41D61C1BCA7F62@ESESSCMS0362.eemea.ericsson.se> <4E54ADC7.8030407@jesup.org> <4E54CC05.1040705@alvestrand.no> <4E54CE29.2060605@ericsson.com> <4E54D867.4060706@alvestrand.no> <4E54D9C2.6000205@ericsson.com> <4E54DE8E.9080207@alvestrand.no> <4E54DFCF.4000805@ericsson.com> <4E54E24F.7060906@alvestrand.no> <4E56707B.104@skype.net> <4E567737.6020101@jesup.org> <4E5680B0.6070702@skype.net> <CAOJ7v-0DnVKYD2gd4os3R-LuzN1mu4qZqjndDEJcJXwY7U-FnA@mail.gmail.com> <4E56E264.8000600@mozilla.com> <CAOJ7v-2kEByX3mq7dRFuo7wEqaEGz597aWuFpEZK9zE_eS6U4A@mail.gmail.com> <4E5747E7.2050605@ericsson.com> <CAOJ7v-1ccLPZhqCDW0ngFkm23TeDSLjNCMUJj-k7wwdg+tTnhg@mail.gmail.com> <4E57AC5C.1020406@ericsson.com>
From: Justin Uberti <juberti@google.com>
Date: Fri, 26 Aug 2011 10:56:26 -0400
Message-ID: <CAOJ7v-1r5stCamNxgMZg9M0sNqB_aKz6T9H2JgDjQwYXBuEFgQ@mail.gmail.com>
To: Stefan Håkansson LK <stefan.lk.hakansson@ericsson.com>
Content-Type: multipart/alternative; boundary="90e6ba5bc13714fe4604ab69c1ea"
X-System-Of-Record: true
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] Additional requirement - audio-only communication
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: Fri, 26 Aug 2011 14:55:36 -0000

On Fri, Aug 26, 2011 at 10:23 AM, Stefan Håkansson LK <
stefan.lk.hakansson@ericsson.com> wrote:

> On 2011-08-26 16:11, Justin Uberti wrote:
>
>>
>>
>> On Fri, Aug 26, 2011 at 3:14 AM, Stefan Håkansson LK
>> <stefan.lk.hakansson@ericsson.**com <stefan.lk.hakansson@ericsson.com>
>> <mailto:stefan.lk.hakansson@**ericsson.com<stefan.lk.hakansson@ericsson.com>>>
>> wrote:
>>
>>    FWIW,
>>
>>    this is how I would do the case of the caller (initiator) wanting to
>>    receive only audio, but willing to send audio and video with the
>>    current API proposal:
>>
>>    1. Generate an audiovisual mediastream (getUserMedia)
>>    2. create PeerConnection, add the above mediastream (addStream)
>>    3. combine the SDP received from PeerConnection with the following
>>    fields "This is an invitation to a communication", "sending audio
>>    and video", "want to receive only audio" into a message sent to the
>>    peer.
>>    4. the app in the peer (same app!) receives the message, reads the
>>    fields, (given user agreement to start the communication) creates a
>>    PeerConnection, feeds the received SDP into the PC, generates an
>>    *audio only* stream (getUserMedia) and adds it to the PC
>>    5. A couple of SDP exchanges later the application is working as
>>    intended. (there will be onaddstream's, you will attach those
>>    streams to video/audio elements etc.)
>>
>>    Quite simple! And no need to have the application read, understand,
>>    or modify, the SDPs - they are opaque. (Then, of course, the
>>    mediastreams must be mapped to RTP sessions and such stuff, but I'm
>>    sure that is solvable and should not be visible in the API IMHO.)
>>
>>
>> Maybe I misunderstand, but it sounds like with these fields you are
>> defining a new signaling protocol, which I think we want to avoid.
>>
>
> That's not how I see it. It is the same web app in both peers, and they can
> communicate inbetween them in any way the app developer see fit (using e.g.
> XHR via the web server). There is already a need for a mechanism to pass the
> SDPs between the browsers, and that mechanism could be used to pass other
> data.
>
> So no new protocol needed!


How will this work if it is not the same web app in both peers, i.e. an
interop scenario? Clearly if it is the same app we can pass along whatever
meta-info we want to instruct the remote side on what to do.


>
>
>
>> Going back to your step 3 - here the initiator can of course munge the
>> generated SDP and discard the m=video section, which should work, but in
>> other cases this munging may cause things to get out of sync since the
>> initiator browser's understanding of the offer now differs from reality.
>>
>
> I would really like to avoid that the web app has to read and modify the
> SDP except for in exceptional cases.
>
> In the current API there is also no need (at least in this case) since all
> streams are set up unidirectional - all that is needed is that the
> application in the browser of the callee gets to know it should add an
> audio-only stream (and it can be told that as I outlined above).
>
>  What we really want is some way to either a) an API to tell the
>> initiator browser to produce an offer with no m=video, or b) a way for
>> the application to customize or generate the offer and feed it back to
>> the browser. b) is definitely more complex, but a) could end up causing
>> us to add a lot of knobs to the API.
>>
>>
>>    Stefan
>>
>>
>>
>>
>>
>>
>>    on 2011-08-26 06:48, Justin Uberti wrote:
>>
>>
>>
>>        On Thu, Aug 25, 2011 at 8:01 PM, Timothy B. Terriberry
>>        <tterriberry@mozilla.com <mailto:tterriberry@mozilla.**com<tterriberry@mozilla.com>
>> >
>>        <mailto:tterriberry@mozilla.__**com
>>
>>        <mailto:tterriberry@mozilla.**com <tterriberry@mozilla.com>>>>
>> wrote:
>>
>>            Justin Uberti wrote:
>>
>>                I think it makes sense for the browser to emit
>> capabilities,
>>                which could
>>
>>
>>            I agree there's clearly some gaps here that need to be filled.
>>
>>
>>                then be used by the web app to generate a SDP offer or
>>        answer. This
>>
>>
>>                The original problem that started this email is one
>> specific
>>                example -
>>                if the callee application wants to only receive audio, the
>>                application
>>                can generate an audio-only SDP based on the offer, the
>>        browser
>>
>>
>>            I think the Harald's original problem was the other way
>>        around: the
>>            _caller_ wants to only receive audio, and needs to generate
>>        an SDP
>>            _offer_ that says that, even if the browser is capable of
>>        receiving
>>            video. I don't think that invalidates your point, though.
>>
>>
>>                capabilities, and the desired app behavior - without any
>> new
>>                APIs in the
>>                browser.
>>
>>
>>            But I'm not sure what you mean by "without any new APIs"...
>>        in your
>>            approach, something has to be able to enumerate the
>>        capabilities in
>>            sufficient detail for the webapp to generate SDP by itself.
>>        I don't
>>            think there are any existing APIs that go that far.
>>
>>
>>        I meant, without specific APIs for that specific use case (i.e.
>>        "create
>>        an audio-only offer"). We would need some sort of
>>        GetCapabilities API
>>        that returned a blob of all the session description options the
>>        browser
>>        supported, which probably could be formatted as a uber SDP offer
>>        if that
>>        made parsing simplest.
>>
>>
>>            You also need an API to tell the browser what to actually
>>        do. The
>>            current PeerConnection approach is passing in the offer or the
>>            answer. If you're generating the answer, you need some way
>>        to tell
>>            your browser what you answered. For the "please don't send
>>        me video"
>>            case this is not an issue... it'll simply never arrive. If
>>        you want
>>            to change what the local browser is sending out, however,
>>        then it is.
>>
>>
>>        Yes, you need a "HandleLocalDescription" and
>>        "HandleRemoteDescription"
>>        API, instead of just a single OnSignalingMessage API. The
>>        deviation from
>>        the current flow is fairly minor, you just have 2 additional
>>        states in
>>        the state machine.
>>
>>
>>            I do agree it eliminates the need for an API to tell the
>> browser
>>            what kind of SDP to generate, but it also seems like it
>>        imposes a
>>            pretty big burden on application developers: even if you
>>        keep the
>>            currently-proposed PeerConnection ability to generate SDP as
>> the
>>        "simple API", the moment you want to do something slightly more
>>            complex, you have to add code to generate the appropriate
>>        SDP, which
>>            necessarily involves figuring out all the capabilities of the
>>            various browsers on various platforms. Maybe I'm naive in
>>        thinking
>>            that seems like an awful lot of work just to say, "Please
>>        don't send
>>            me video."
>>
>>
>>        It's a fair point, there is more complexity involved in
>>        generating the
>>        offer, but in our experience it is manageable. I suppose it
>>        depends on
>>        how many APIs we decide we need to control the generation of SDP
>>          (i.e.
>>        use cases other than no-video). If we decide we need to control
>>        crypto,
>>        resolution preference, codec preference, we may find this
>>        approach simpler.
>>
>>
>>            ______________________________**_____________________
>>            rtcweb mailing list
>>        rtcweb@ietf.org <mailto:rtcweb@ietf.org> <mailto:rtcweb@ietf.org
>>
>>        <mailto:rtcweb@ietf.org>>
>>
>>        https://www.ietf.org/mailman/_**___listinfo/rtcweb<https://www.ietf.org/mailman/____listinfo/rtcweb>
>>        <https://www.ietf.org/mailman/**__listinfo/rtcweb<https://www.ietf.org/mailman/__listinfo/rtcweb>
>> >
>>        <https://www.ietf.org/mailman/**__listinfo/rtcweb<https://www.ietf.org/mailman/__listinfo/rtcweb>
>>        <https://www.ietf.org/mailman/**listinfo/rtcweb<https://www.ietf.org/mailman/listinfo/rtcweb>
>> >>
>>
>>
>>
>>    ______________________________**___________________
>>    rtcweb mailing list
>>    rtcweb@ietf.org <mailto:rtcweb@ietf.org>
>>    https://www.ietf.org/mailman/_**_listinfo/rtcweb<https://www.ietf.org/mailman/__listinfo/rtcweb>
>>    <https://www.ietf.org/mailman/**listinfo/rtcweb<https://www.ietf.org/mailman/listinfo/rtcweb>
>> >
>>
>>
>>
>