[whatwg] Limiting the amount of downloaded but not watched video

Zachary Ozer zach at longtailvideo.com
Thu Jan 20 10:16:21 PST 2011


On Thu, Jan 20, 2011 at 3:14 AM, Philip Jägenstedt <philipj at opera.com>wrote:
> * effective state can only increase to higher states, never go from e.g.
> metadata to none (it makes no sense)

What if my bandwidth situation improves (moving from 3g to WiFi, for example)?
At that point, perhaps I should go from auto to invoked?

On Thu, Jan 20, 2011 at 4:19 AM, Glenn Maynard <glenn at zewt.org> wrote:
> I think that pausing shouldn't affect read-ahead buffering behavior.  I'd
> suggest another preload value, preload=buffer, sitting between "metadata"
> and "auto".  In addition to everything loaded by "metadata", it also fills
> the read-ahead buffer (whether the video is playing or not).

Would the read-ahead buffer length be a configurable property?

== New Proposal ==

Based on the feedback we've gotten, I'd like to propose the following:
* Adding an additional preload state between metadata and auto (I'll
call it state3, but we should name it "invoked" or "buffer")
* Adding the "downloadTargetBuffer" property, which can be updated at any time

=== Use cases ===

==== Starting with preload = none / meta ====

* Once the user has indicated they want to play a video, the browser
  will go into state3 and buffer at least "downloadTargetBuffer" seconds
  of video before playing
* Once in state3, the browser will attempt to maintain a buffer of
  approximately "downloadTargetBuffer" seconds, regardless of state
* If the browser cannot maintain a buffer of length
  "downloadTargetBuffer", it will set preload = "auto"
* If preload is later set back to state3, the browser will:
  > If the buffer >= "downloadTargetBuffer" seconds:
   - The browser will play through the current buffer surplus until it
     has approximately "downloadTargetBuffer" seconds in the buffer
   - Once the surplus has been used, the browser will attempt to
     maintain a buffer of approximately "downloadTargetBuffer"
     seconds
   - If the browser cannot maintain a buffer of length
     "downloadTargetBuffer", it will set preload = "auto"
 > If the buffer < "downloadTargetBuffer" seconds:
   - The browser will set preload = "auto"

==== Starting with preload = state3 ====

* On page load, the browser will go into state3 and buffer at least
  "downloadTargetBuffer" seconds of video before playing
* Once the user has indicated they want to play a video, the browser
  will attempt to maintain a buffer of approximately
  "downloadTargetBuffer" seconds, regardless of state
* If the browser cannot maintain a buffer of length
  "downloadTargetBuffer", it will set preload = "auto"
* If preload is later set back to state3, the browser will:
  > If the buffer >= "downloadTargetBuffer" seconds:
   - The browser will play through the current buffer surplus until it
     has approximately "downloadTargetBuffer" seconds in the buffer
   - Once the surplus has been used, the browser will attempt to
     maintain a buffer of approximately "downloadTargetBuffer"
     seconds
   - If the browser cannot maintain a buffer of length
     "downloadTargetBuffer", it will set preload = "auto"
 > If the buffer < "downloadTargetBuffer" seconds:
   - The browser will set preload = "auto"

==== Starting with preload = auto ====

* On page load, the browser will go into auto and buffer as much video
  as possible
* If preload is later set to state3, the browser will:
  > If the buffer >= "downloadTargetBuffer" seconds:
   - The browser will play through the current buffer surplus until it
     has approximately "downloadTargetBuffer" seconds in the buffer
   - Once the surplus has been used, the browser will attempt to
     maintain a buffer of approximately "downloadTargetBuffer"
     seconds
   - If the browser cannot maintain a buffer of length
     "downloadTargetBuffer", it will set preload = "auto"
 > If the buffer < "downloadTargetBuffer" seconds:
   - The browser will set preload = "auto"

Best,

Zach
--
Zachary Ozer
Developer, LongTail Video

w: longtailvideo.com • e: zach at longtailvideo.com • p: 212.244.0140 •
f: 212.656.1335
JW Player  |  Bits on the Run  |  AdSolution


More information about the whatwg mailing list