Re: [rtcweb] When are ICE candidates added to the SDP

Iñaki Baz Castillo <ibc@aliax.net> Mon, 12 May 2014 09:25 UTC

Return-Path: <ibc@aliax.net>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 512551A059F for <rtcweb@ietfa.amsl.com>; Mon, 12 May 2014 02:25:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.978
X-Spam-Level:
X-Spam-Status: No, score=-0.978 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4Xnn4Cw4vVjQ for <rtcweb@ietfa.amsl.com>; Mon, 12 May 2014 02:25:49 -0700 (PDT)
Received: from mail-qg0-f46.google.com (mail-qg0-f46.google.com [209.85.192.46]) by ietfa.amsl.com (Postfix) with ESMTP id 68A871A055D for <rtcweb@ietf.org>; Mon, 12 May 2014 02:25:49 -0700 (PDT)
Received: by mail-qg0-f46.google.com with SMTP id q108so7181832qgd.19 for <rtcweb@ietf.org>; Mon, 12 May 2014 02:25:43 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=+O7tnquzl2P24S8z1PJD6KEAKeQwG0wI4wjCD6rdBjE=; b=nC4OQtHN0UAwgckwLPcVvSp8QcefbBhbbIaeA6UQSsz06DH8EebDGEU4l7MdBiXHw9 bUSi19FQlHgaNpIH3vDVF9LUCvP8cW0n/Lcyabitgehrnhjb3iQcSyeLT6YwQ2JvT4Tj AF68v5kBHLpv46mR/75mVuZA5nnXf3/g2NLf+VDvi13Smg1Tb8fh8sRUnI+kEOd7QaaK WIL5GwnrK2U6sBXvFXEVxALlH8OTRzIt9OkicZ4YgWnEchKY7Laj4znPavplfO89b/Rb wCyS6HWk3a+Og0mAx0ugxKDbnOaCtphUuanNZ1bba2A7w4mS7dsOb8s3411jjAYFTVJ6 mMqQ==
X-Gm-Message-State: ALoCoQk2aR34dcWN/hGe5kaJBhXuh75+p82wvZuTKIq2uyLa5JlXlG8+H10fAK9y4YRBfai8jqER
X-Received: by 10.224.134.194 with SMTP id k2mr35818039qat.5.1399886743404; Mon, 12 May 2014 02:25:43 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.96.203.165 with HTTP; Mon, 12 May 2014 02:25:23 -0700 (PDT)
In-Reply-To: <CABcZeBNUTf42tS9FrjS9Q6Zk8LBkhpKOR1z2v8MHoeNEUf93Mw@mail.gmail.com>
References: <CABcZeBNUTf42tS9FrjS9Q6Zk8LBkhpKOR1z2v8MHoeNEUf93Mw@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
Date: Mon, 12 May 2014 11:25:23 +0200
Message-ID: <CALiegfmPd4y8t6W=E0DM7yf4_FGHXA9y0hrFp0M_U_g-=wQaLA@mail.gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/rtcweb/9ix-tye8QSLS_7dssreTp4saYks
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] When are ICE candidates added to the SDP
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.15
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: Mon, 12 May 2014 09:25:52 -0000

2014-05-12 1:51 GMT+02:00 Eric Rescorla <ekr@rtfm.com>om>:
> 0. pc = new RTCPeerConnection();
> 1. pc.AddStream(stream);
> 2. pc.CreateOffer();
> 3. CreateOffer callback fires with offer A, and you call
> SetLocalDescription();
> 4. onicecandidate fires with candidate X.
> 5. pc.CreateOffer()
> 6. CreateOffer callback fires with offer B.
> 7. onicecandidate fires with null.
>
> So, in London, I think we agreed that offer A would have no candidates.
> The above text implies that if you were to examine localdescription prior
> to step #5 or at step #7 it would contain candidate X, and probably that
> offer B would also contain candidate X.
>
> Note that it's quite inconvenient for non-trickle applications to never
> have any candidates in the SDP, especially after gathering is completed
> at step #7. However it also seems kind of inconsistent to only update the
> candidates after SetLocal() has been called.

Well, ugly problem due to ugly design, so ugly solution:

- var myDesc = pc.localDescription;
+ var myDesc = pc.getLocalDescription({candidates: true});



-- 
Iñaki Baz Castillo
<ibc@aliax.net>