Re: [rtcweb] Low Level Javascript API Proposal avail on the webrtc list

Colin Perkins <> Thu, 06 October 2011 22:08 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 0E4F11F0C6D for <>; Thu, 6 Oct 2011 15:08:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -103.556
X-Spam-Status: No, score=-103.556 tagged_above=-999 required=5 tests=[AWL=0.042, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, USER_IN_WHITELIST=-100]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id FO6I2pzo0LBQ for <>; Thu, 6 Oct 2011 15:08:12 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id CE5891F0C3B for <>; Thu, 6 Oct 2011 15:08:11 -0700 (PDT)
Received: from ([] helo=[]) by with esmtpsa (AUTH csperkins-dwh) (TLSv1:AES128-SHA:128) (Exim 4.69) id 1RBw9y-0002Hc-i5; Thu, 06 Oct 2011 22:11:22 +0000
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: multipart/alternative; boundary="Apple-Mail-1047-329465388"
From: Colin Perkins <>
In-Reply-To: <>
Date: Thu, 06 Oct 2011 23:11:21 +0100
Message-Id: <>
References: <> <> <> <> <> <> <> <>
To: Roman Shpount <>
X-Mailer: Apple Mail (2.1084)
Subject: Re: [rtcweb] Low Level Javascript API Proposal avail on the webrtc list
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 06 Oct 2011 22:08:13 -0000

On 5 Oct 2011, at 18:20, Roman Shpount wrote:
> On Wed, Oct 5, 2011 at 7:00 AM, Neil Stratford <> wrote:
> I'm not sure I understand why this is such a problem. XMPP/Jingle defines it's own mapping, which is a common VoIP protocol that is widely supported. I'd much rather that the JS API is as expressive as possible in codec specific matters - for example even to the point of providing callbacks to the JS on certain codec level events, such as decoding a DTMF digit.
> What we need is some way to expose all possible codec parameter combinations to JavaScript API. MMUSIC/PAYLOAD specifications for codec typically define CODEC parameters and how they are encoded in SDP/MIME content type, but they fall short of defining a way to list all the capabilities.

I'm not convinced that exposing all possible codec parameter combinations is an appropriate goal. There is simply too much flexibility present with many of the codecs, especially in combination, for the signalling to be reasonable if all the flexibility is exposed. Better, I think, for the browser to expose a set of known-reasonable combinations, and parameter ranges, from which the most appropriate choice is picked.

> For instance, there is no way for SILK codec to specify valid bit rates range for a given sampling rate. This means JavaScript would need intimate knowledge of each codec implementation in the browser in order to implement codec negotiation. If a different codec implementation is provided by the browser (for instance SILK codec that supports more restricted bit rates for the same sampling rate), JavaScript will not be able to produce valid negotiation results. As far as I can see, there are two possible solutions: better uniform description of codec capabilities to JavaScript API or delegating at least some portion of codec negotiation to actual codec implementation.
> Again, if it's required I don't see why we can't support asymmetric codecs in the low level API. In my view a lot of this codec manipulation is much better controlled by the JS which has application specific knowledge about how to adapt to given situations than the browser itself. How would you signal to the browser to dynamically lower framerate rather than image size, or colour depth depending on the application use case? Giving the application direct control over codec parameters seems a better option.
> I believe in current API we provide one codec with one set of parameters to the API. We should at least be able to provide two codec groups -- one for transmit/another to receive, with two sets of parameters. Even if we handle all the negotiations in JavaScript, we should be able to provide the result for both directions to the stream (may be with default value for the second codec group to be the same as first since this is a much more common).
> ______________
> Roman Shpount
> _______________________________________________
> rtcweb mailing list

Colin Perkins