Re: Should <video> buffer control be tri-state?

On Fri, Jan 8, 2010 at 8:54 PM, Philip Jägenstedt <philipj@opera.com> wrote:
> On Fri, 08 Jan 2010 09:05:51 +0100, Julian Reschke <julian.reschke@gmx.de>
> wrote:
>
>> Philip Jägenstedt wrote:
>>>
>>> ...
>>> To get the first frame and duration for Ogg Theora, you must make at
>>> least 2 HTTP requests to get the beginning and end of the file (unless the
>>> X-Content-Duration header is used, in which case 1 would suffice). ...
>>
>> Out of curiosity, exactly what HTTP requests are these?
>
> Two GET with Range: bytes=x-y should do if you can guess the amount of data
> needed at the beginning at end well enough and if the total size of the
> resource is returned with the first request (I don't know if that's
> typically the case or not).

The Ogg file header right now doesn't contain information on the
duration of the resource, but the reply to the byte range request does
return the length of the resource in bytes. If the server supports it,
a HTTP X-Content-Duration header provides the duration of the
resource.

Regards,
Silvia.

Received on Friday, 8 January 2010 10:50:40 UTC