Make MediaStream usable with postMessage

Last month there was a discussion regarding (to some extent as a 
consequence of the proposal to remove createObjectURL) making a 
MediaStream work with web messaging [1], read the messages with subject 
'removing createObjectURL' and 'Cross-entity mediastreams' in the 
archive of September for more background.

I took a stab at how this could affect the "Media Capture and Streams" 
draft:
==================================
Section "Terminology, HTML Terms": Add that "structured clone" is 
defined in [HTML5]

Section 4.2 "MediaStream", add sentence:
"MediaStream is intended to be usable with HTML5 Web Messaging's 
postMessage API", link to http://dev.w3.org/html5/postmsg/

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?

Stefan

[1] http://dev.w3.org/html5/postmsg/

Received on Monday, 21 October 2013 07:29:13 UTC