W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2011

[whatwg] Stream API Feedback

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Thu, 17 Mar 2011 14:11:39 +0100
Message-ID: <4D82088B.8070705@lachy.id.au>
On 2011-03-16 19:29, Olli Pettay wrote:
> Perhaps navigator.getUserMedia("audio,video", success, error);
> could return an url to the device in the success callback, and that url
> could be then set to video.src.

The creation of a URL is unnecessary indirection.  It's easier to avoid 
creating special URLs entirely, and instead assign the the Stream object 
directly to video.src.


navigator.getUserMedia("video", function(stream) {
   video.src = stream;

This is then reflected in the src content attribute as 
"about:streamurl", and is returned upon getting video.src.  This 
requires that the HTMLMediaElement src property definition needs to be 
changed from DOMString to any.

Lachlan Hunt - Opera Software
Received on Thursday, 17 March 2011 06:11:39 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC