Describing recording by means of the Media Source interface

I'm scanning the Media Source interface, and seeing how it describes 
data formats for the buffers it uses.

It seems to me logical to describe the recording interface in such a way 
that:

If there exists a video stream v, a media source msrc and a media stream 
ms, and (conceptually) msProducesData(buffer) is called every time data 
is available at the recording interface,
then the following code:

// Setup
v.src = window.URL.createObjectURL(msrc);
buffer = msrc.addSourceBuffer(mimetype)
// So far unknown setup for the recorder interface

// playback
msProducesData(data) {
     buffer.append(data)
}


should produce the same display (possibly somewhat delayed due to 
buffering) as

v.src = window.URL.createObjectURL(ms)

The media source definition is available here:

http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html

It seems to me that if we can make sure this actually works, we'll have 
achieved a little consistency across the media handling platform.

                       Harald

Received on Thursday, 23 August 2012 11:17:25 UTC