[whatwg] Stream API Feedback

On 03/17/2011 03:11 PM, Lachlan Hunt wrote:
> 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.


The type of .src is string.
Assigning a different type of object to it
is quite strange.

Also, if getUserMedia would return just an URL, browser wouldn't need
to create any stream object (unless someone then want to stream
from <video> to PeerConnection).

>... src property definition needs to be changed
> from DOMString to any.

That would be strange and make API inconsistent with <img> and <iframe> 
for example.



-Olli

Received on Thursday, 17 March 2011 08:48:40 UTC