Re: removing createObjectURL

On 2013-09-12 17:45, Martin Thomson wrote:
> On 11 September 2013 22:26, Adam Bergkvist <adam.bergkvist@ericsson.com> wrote:
>> I think it would be easier to send a clone of the MediaStream object (with
>> postMessage()) and let the original window remain the owner, instead of
>> transferring ownership.
>
> Yeah, I think that's very confusing.  You can only
> send^H^H^H^Htransfer Transferable objects with postMessage, so how
> would this work?
>

In addition to transferring objects with postMessage()'s third argument, 
you can send certain objects (File, FileList, Blob, ...) as the first 
"message" argument (of type any) [1]. Objects sent that way are cloned, 
not transferred, and are still usable on the sending side after being sent.

This way, we don't have to define what a neutered MediaStream is and 
"ownership" will always be kept by the page that has done getUserMedia() 
or contains the PeerConnection instance that feeds a remote stream.

/Adam

[1] http://dev.w3.org/html5/postmsg/#posting-messages

Received on Friday, 13 September 2013 05:33:32 UTC