[rtcweb] Inspect a received SDP *before* using it

Iñaki Baz Castillo <ibc@aliax.net> Fri, 04 January 2013 10:24 UTC

Return-Path: <ibc@aliax.net>
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 A894E21F8EA7 for <rtcweb@ietfa.amsl.com>; Fri, 4 Jan 2013 02:24:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.077
X-Spam-Level:
X-Spam-Status: No, score=-2.077 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, J_CHICKENPOX_55=0.6, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1E3nxMkAKGbs for <rtcweb@ietfa.amsl.com>; Fri, 4 Jan 2013 02:24:57 -0800 (PST)
Received: from mail-qc0-f170.google.com (mail-qc0-f170.google.com [209.85.216.170]) by ietfa.amsl.com (Postfix) with ESMTP id 2C84521F8E23 for <rtcweb@ietf.org>; Fri, 4 Jan 2013 02:24:56 -0800 (PST)
Received: by mail-qc0-f170.google.com with SMTP id d42so8702570qca.1 for <rtcweb@ietf.org>; Fri, 04 Jan 2013 02:24:56 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding:x-gm-message-state; bh=T1ecNeS7alKPKmZ3y5CjfGqj8eCPYWxtXOvVREuP7Mo=; b=okM9BxrPACR3YO2lhRsh3678XCBKnZs3A0u88p3vjUTFTOjZ5RG8+LETk6Ve8P6w72 6sYARpu+GUqCSWJOeA95N/TijCBHqLY3QxpGNbzKLRyDUM39yxeFv9wngBI9HPnaDMJe BFAR9eGSBySzjPboGwtg9196Em8WezZTItsF+vU4C3vXgOPMSN5fZrAzqqrNQmulgMrf QDz07uCKFqRW9DJgKKP1N7ciOZSAbvNqn3j/pS4eb8wzjZ1w8mUXSzIVXMdT9vG8q/O+ cPS3KSVfTXxuyJF3jx30fkAQCqtiM7AsOT29Gut0RIY9npV2K5dvcmgC2RrkKgNeV+wF vG9Q==
Received: by 10.49.71.178 with SMTP id w18mr36783371qeu.11.1357295096447; Fri, 04 Jan 2013 02:24:56 -0800 (PST)
MIME-Version: 1.0
Received: by 10.49.94.193 with HTTP; Fri, 4 Jan 2013 02:24:36 -0800 (PST)
From: Iñaki Baz Castillo <ibc@aliax.net>
Date: Fri, 04 Jan 2013 11:24:36 +0100
Message-ID: <CALiegf=eD33TpecEfyo5jeLUKTq6Yo1qM20f4wD_pqriBV46Eg@mail.gmail.com>
To: rtcweb@ietf.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Gm-Message-State: ALoCoQkMfJb/a0gOcUzQP7xYuhcg9LnfRMxpbDG9b1f5zZRoEfe6gqwuq6E3S22sY5e3rrElIbNI
Subject: [rtcweb] Inspect a received SDP *before* using it
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, 04 Jan 2013 10:24:57 -0000

Hi, the WebRTC JavaScript API does not define a mechanism for
parsing/inspecting a received SDP (a string), so there are two
"solutions":


1) Manually parse de SDP at JS level, which is ugly taking into
account that the browser includes a tested SDP parser.

2) Call to RTCPeerconnection.setRemoteDescription(RECEIVED_SDP), which
means that the media stream begins.


The point here is to know what the remote peer is offering to us
(audio? audio+video?) before calling to getUserMedia(), so we (the web
application) can tell the user about which kind of media session the
remote peer is offering to him.


Do I miss something? As said above the specs don't seem to provide
this funcionality at JS API.


Thanks a lot.


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