Re: StreamBuilder threshold

On 01/26/2012 07:05 PM, Feras Moussa wrote:
> Can you please clarify what scenario you are looking at regarding
> multiple consumers? When designing the StreamBuilder API, we looked
> at it as a more primitive API which other abstractions (such as
> multiple consumers) can be built upon.

(Please forgive me if I am making stupid input - I am in a learning 
phase). A very simple scenario would be the example in the draft that 
"demonstrates how to use StreamBuilder to load a stream into the audio 
tag". In this example the consumer is an audio tag, and new data is 
appended to the stream each time the buffer falls below 1024 bytes. Fine 
so far, but what happens if the same stream (via createObjectURL) is 
connected to one more audio tag, but at T ms later.

In this case the first audio tag would have consumed down to the 
threshold (1024 bytes) T ms before the second.

Another example could be that one Stream is uploaded using two parallel 
xhr's; one of them could have a couple of pakcet losses and then consume 
slower than the other (and if WS could take send(stream) the same would 
> If you can please let me know what issue you're trying to address,
> I'm happy to discuss the possibilities.

I hope the above input explained the issue.

> Also, For future reference, the latest draft is now located on the W3
> site at

Thanks for updating me!


> Thanks, Feras
>> -----Original Message----- From: Stefan Hakansson LK
>> [] Sent: Tuesday, January
>> 17, 2012 12:28 AM To: Feras Moussa; Travis Leithead Cc:
>> Subject: StreamBuilder threshold
>> I'm looking at
>>, and
>> specifically at the StreamBuilder.
>> It has the possibility to generate an event if the data available
>> falls below a threshold. How is this supposed to work if there is
>> more than one consumer, and those consumers either don't start
>> consuming at exactly the same time or consume at different rates,
>> of the Stream?
>> --Stefan

Received on Sunday, 5 February 2012 12:50:50 UTC