Re: An updated MediaRecorder proposal based on streams

This wouldn't have to be v2, because we're nowhere close to finished 
with v1 yet.  There's plenty of time to consider changes like this as 
part of v1.  I am not familiar with the streams API, so I have some 
questions on the details of how the MediaRecorder's notion of Blobs 
aligns with the ReadableStream's notion of 'chunks'.

First off, how does the MediaRecorder's timeslice get represented at the 
ReadableStream level?  For the most part, the ReadableStream definitions 
talk about 'chunks', without saying how big they are.  I do notice a 
strategySize function.  Is that used to define the size of the enqueued 
chunks?  And if so, would setting timeslice create a strategySize 
function that would define the chunks to be of size timeslice?.

MediaRecorder also allows recording without specifying timeslice. In 
this case, the client can call requestData() and get all the data that 
has accumulated since its last call.  In this case, would the size of 
the chunks be the platform default?  Would requestData() return as many 
complete chunks as had been collected? (ReadableStreamReader seems to 
return individual chunks, but requestData() expects to get all 
accumulated data, even if there are multiple chunks.)

- Jim

On 8/12/2015 4:28 PM, Domenic Denicola wrote:
> Hi all,
>
> There is some interest from Blink [0] in reviving the MediaRecorder proposal [1], currently only implemented in Firefox, by basing it on the streams API [2]. I managed to spend some time drawing up what this would look like:
>
> https://domenic.github.io/streaming-mediastreams/
>
> It largely encompasses the use cases and API of MediaRecorder, with only minor tweaks. I believe it can do everything MediaRecorder can do, with the additional benefits of integrating with the standard streaming infrastructure and having a much more pleasant-to-use API as a consequence, avoiding the potential data loss that the current event-based API can induce.
>
> I would love for the group to give feedback on this proposal. Does it seem plausible as a "MediaRecorder v2"?
>
>   [0]: https://groups.google.com/a/chromium.org/d/msg/blink-dev/2l_G_apqk30/G0IsV3lEWNwJ
> [1]: https://w3c.github.io/mediacapture-record/MediaRecorder.html
> [2]: https://streams.spec.whatwg.org/
>

Received on Thursday, 13 August 2015 14:37:43 UTC