Re: Getting the MediaStream associated with a video element?

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:00:15 UTC