W3C home > Mailing lists > Public > public-media-capture@w3.org > November 2013

Re: Getting the MediaStream associated with a video element?

From: cowwoc <cowwoc@bbs.darktech.org>
Date: Wed, 13 Nov 2013 02:03:14 -0500
Message-ID: <52832432.7030605@bbs.darktech.org>
To: Adam Bergkvist <adam.bergkvist@ericsson.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
Hi Adam,

That's for the clarification. What's the actual implementation status on 
Chrome and Firefox (stable)? I ask because 
https://code.google.com/p/webrtc/source/browse/trunk/samples/js/base/adapter.js?r=5031 
still looks for srcObject, mozSrcObject and src fields.

Is it safe to drop this code and access srcObject directly?

Thanks,
Gili

On 13/11/2013 1:59 AM, Adam Bergkvist wrote:
> On 2013-11-13 06:16, cowwoc wrote:
>> Hi,
>>
>> I've seen code for attaching MediaStream to a <video> element, but
>> shouldn't we also be able to do the opposite? If the following code is
>> used to attach:
>>
>>      video.src = URL.createObjectURL(stream);
>>
>> how are we supposed to translate the URL back into a MediaStream?
> We don't support the createObjectURL() method of rendering a MediaStream
> anymore. The supported way is to use the srcObject attribute on the
> media elements.
>
> video.srcObject = stream;
>
> In case you can just read the srcObject attribute to get the stream.
>
> This topic belongs on the public-media-capture list (cc'ed). When
> replying to this message, please remove the public-webrtc list.
>
> /Adam
>
Received on Wednesday, 13 November 2013 07:03:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:24:43 UTC