W3C home > Mailing lists > Public > public-webrtc@w3.org > October 2011

RE: CHANGE: Use a JS Object as an argument to getUserMedia

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Wed, 5 Oct 2011 15:51:27 +0200
To: Tommy Widenflycht (ᛏᚮᛘᛘᚤ) <tommyw@google.com>, Anant Narayanan <anant@mozilla.com>
CC: "public-webrtc@w3.org" <public-webrtc@w3.org>
Message-ID: <A1249B08688639468D1CB181445EE79D3A867A666D@ESESSCMS0355.eemea.ericsson.se>

Hi

I agree with Tommy. Right now, once you have a MediaStream you can start
using it. If getUserMedia returns a stream directly, it would have to be
empty (no tracks), and tracks would have to be added later. I think it
would simplify things (e.g. MediaStream playback and sending with
PeerConnection) if a MediaStream is immutable with regards to its track
list.

/Adam

On 2011-10-05 08:59, Tommy Widenflycht (ᛏᚮᛘᛘᚤ) wrote:
> Yeah, I understood that during the office hour call. Dunno, your 
> suggestion seems less elegant and clear but that might just be because 
> I am quite new to the JS world. Can you list some use cases where your 
> suggestion will really make a difference?
>
> /Tommy
>
>
> On Tue, Oct 4, 2011 at 19:45, Anant Narayanan <anant@mozilla.com 
> <mailto:anant@mozilla.com>> wrote:
>
>     On Oct 4, 2011, at 12:33 AM, Tommy Widenflycht (ᛏᚮᛘᛘᚤ) wrote:
>      > Whereas I have nothing against changing the configuration string
>     to a JS object, I don't like the conversion from asynchronous result
>     to a synchronous one. Opening a webcam can take many seconds, which
>     means that the JS world is stuck during that interval.
>
>     The proposal doesn't suggest that the operation is asynchronous, you
>     do have to attach an event listener or a callback on the MediaStream
>     that is returned. It behaves exactly like XHR in this regard.
>
>     Cheers,
>     -Anant
Received on Wednesday, 5 October 2011 13:52:33 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:25 UTC