Re: Make MediaStream usable with postMessage

On 2013-10-21 15:01, Anne van Kesteren wrote:
> On Mon, Oct 21, 2013 at 8:28 AM, Stefan Håkansson LK
> <stefan.lk.hakansson@ericsson.com> wrote:
>> Section 4.2 "MediaStream", add paragraph:
>> "When a user agent (e.g. as result of postMessage() being called with a
>> MediaStream as argument) is required to obtain a structured clone of a
>> MediaStream, follow the algorithm outlined in
>> [http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#safe-passing-of-structured-data];
>> when the 'internal structured cloning algorithm' step is reached, carry
>> out the same processing as if the 'clone()' method had been called for
>> that MediaStream, and let streamClone be output."
>> =================================
>>
>> Does this look reasonable?
>
> We'll move this to JavaScript eventually, see
> https://github.com/dslomov-chromium/ecmascript-structured-clone for
> work in progress, and at that point you'll need to make it clear it
> ends up in a different global as well (realm in ES6-speak). So you
> can't just use clone() as that only works same-global

Thanks for feedback.

I see from the github doc that InternalStructuredClone will take a
"targetRealm" input, and I assume you mean that we need have that
covered in the InternalStructuredClone algorithm for MediaStream.

Is that right?

If so I guess we need to device a InternalStructuredClone algorithm that 
takes a targetRealm input. Do you see "targetRealm" coming soon, or 
would something like I proposed be sufficient for now?

(Anne, sorry for spamming you, by mistake a missed the public- list in 
my first response)

>
>


Received on Monday, 21 October 2013 14:10:29 UTC