HTML5 video 'buffered' property available in Firefox 4

This is a repost from Chris Pearce’s blog.

Recently I landed support for the HTML5 video ‘buffered’ property in Firefox. This is cool because we can now accurately determine which time-segments of a video we can play and seek into without needing to pause playback to download more data. Previously you could only get the byte position the download had reached, which often doesn’t map to the time ranges which are playable very well, especially in a variable bit rate video. This also can’t tell you if there are chunks which we skipped downloading before the downloaded byte position. Once the video controls UI is updated, users will be able to know exactly which segments of their video are downloaded and playable and can be seeked into without pausing playback to download more data.

To see this in action, download a current Firefox nightly build , and point your browser at my video ‘buffered’ property demo. You’ll see something like the screenshot below, including an extra progress bar (implemented using canvas) showing the time ranges which are buffered.

I’ve implemented the ‘buffered’ property for the Ogg and WAV backends. Support for the ‘buffered’ property for WebM is being worked on by Matthew Gregan, and is well underway. At the moment we return empty ranges for the ‘buffered’ property on video elements playing WebM and raw video.

My checkin just missed the cutoff for Firefox 4 Beta 3, so the first beta release that the video ‘buffered’ property will appear in is Firefox 4 Beta 4.

About Chris Pearce

More articles by Chris Pearce…


  1. Richard Stallman

    I’d just like to interject for a moment. What you’re refering to as Linux, is in fact, GNU/LInux, or as I’ve recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

    Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called “Linux”, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.

    There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine’s resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called “Linux” distributions are really distributions of GNU/Linux.

    August 20th, 2010 at 01:07

    1. Cleroth

      And, to shorten the definition, we just call it Linux.

      September 5th, 2010 at 13:31

      1. Peter

        While I think we should give the Linux developers credit, if we wish to shorten the name, it would accurately be shortened to “GNU”.

        October 24th, 2010 at 07:25

    2. Guido

      What a dork. It’s like being pissed because someone calls Windows instead of “Microsoft Windows”.
      Everyone knows it’s GNU/Linux but who cares.
      And besides we couldn’t call it GNU for short, BSD also uses GNU and there is no way to tell what we are refering to.
      Just deal with it.

      October 23rd, 2010 at 16:23

      1. Chris

        Guido: “It’s like being pissed because someone calls Windows instead of ‘Microsoft Windows’.”

        Well this argument has no weight since in fact you are talking about a product made by the same company, GNU+Linux is in fact that GNU plus Linux, it is two very different things made by two very different projects that happened to work together very well. Lets give credit where credit is due.

        And you have made a mistake on the whole GNU , BSD situation, here is an excerpt from the GNU site:

        “People sometimes ask whether BSD too is a version of GNU, like GNU/Linux. The BSD developers were inspired to make their code free software by the example of the GNU Project, and explicit appeals from GNU activists helped persuade them, but the code had little overlap with GNU. BSD systems today use some GNU programs, just as the GNU system and its variants use some BSD programs; however, taken as wholes, they are two different systems that evolved separately. The BSD developers did not write a kernel and add it to the GNU system, and a name like GNU/BSD would not fit the situation”

        So the example would be like a “strawberry swirl cheese cake”, it would be insufficient to call it just “strawberry cake” or “cheesecake” it could only be called by what it is.

        November 8th, 2010 at 22:27

  2. Mardeg

    Does this mean the following test should pass?:

    This is filed as

    August 22nd, 2010 at 14:12

  3. N

    Oh my god… the 4Chan “interjection” meme is spreading beyond 4Chan…

    August 23rd, 2010 at 11:25

  4. Felipe

    The feature implemented is great! Way better than flash videos.

    August 24th, 2010 at 12:26

  5. Tsiolkovsky

    @Guido. Calling someone that is fighting so hard for basic freedoms of computer users a dork is not a smart thing to do. And your argument about the right naming of the GNU/Linux is answered in this document:
    I suggest you read it all as I have a feeling you may have some other misconceptions on which you then base your arguments.

    October 24th, 2010 at 07:18

  6. Peter

    Calling Microsoft Windows, Windows is less explicit but still accurate. It’s simply a shorter name. Calling GNU/Linux, Linux isn’t less explicit, it’s misleading.

    October 24th, 2010 at 07:29

  7. David


    I fully support and agree with Tsiolovsky’s reply to your comment and would add that to ignore the work done by those who gave us the GNU project and who have striven so long and so diligently to preserve and protect those freedoms mentioned in the link Tsiolovsky gave you by terming them “dorks” or any other insult at all risks losing those freedoms. If all it takes for you to support and acknowledge the work done on behalf of those who use GNU/Linux and to do your bit to keep and protect those freedoms mentioned in the link is to call thees products by their correct names it’s little enough to ask.

    October 24th, 2010 at 11:05

  8. Mike

    @Guido – you are incorrect that everyone is aware that, when the term “Linux” is used in context of an entire operating system, that it implies “GNU/Linux”. In fact, the majority of casual (generally non-technical) GNU/Linux users I have spoken with are hardly aware of GNU. Not only does using the term GNU/Linux bring attention to the fact that they are using the GNU operating system and the freedoms that it provides, it also serves as a correction.

    Calling “Microsoft Windows” by the name “Windows” is correct – Microsoft is the company. Their product is in fact called “Windows”. However, GNU has no connection with Linux other than the fact that Linux is bundled with GNU in order to form a complete operating system. GNU isn’t the company behind Linux, so leaving GNU out of the equation doesn’t shorten it. It’s simply incorrect.

    Using the term GNU/Linux both gives credit to all the individuals who have fought so hard and put so much time into developing a free (as in freedom) operating system. That aside, calling someone a dork for protecting your freedoms is rather insulting, especially if you yourself are a GNU/Linux user (I’m not saying that you are or not). Especially when referring to the person who both started and devoted his life to the free software movement.

    All that said, I do understand why people use the term “Linux” when speaking aloud about the GNU/Linux operating system. It’s a mouthful and it is indeed much easier to simply say “Linux”. Everyone finds ways to shorten things. I make an attempt to say GNU/Linux wherever possible, though I do slip at times as well. It’s important to keep in mind that when shortening a term, that it should still convey the same meaning. However, there’s really no reason when writing an article or typing not to use the term GNU/Linux.

    October 24th, 2010 at 12:41

  9. Karthikeyan A K

    I think its better for free software supporters to call GNU/Linux than Linux. If there was just Linux, it wouldn’t have been what it is now. Its because of GNU’s effort that Linux is more palatable. I would prefer to call GNU/Linux.

    October 24th, 2010 at 18:53

  10. Michael

    Interesting discussion, albeit off-topic. I personally support calling it “GNU/Linux”. The reference to “Microsoft Windows vs Windows” is not accurate. More accurate would be a comparison between a (peanut-butter && jelly sandwich) and a (peanut-butter sandwich || jelly sandwich). With a PB&J, you can’t just call it a peanut-butter sandwich or a jelly sandwich; it’s gotta be “peanut butter and jelly”, else it doesn’t reflect reality.

    “There are a lot of generic brands on the market that are just as tasty as the real thing”
    — Chris Knight, Real Genius

    December 28th, 2010 at 11:21

  11. Brent J

    To appease the Stallmanites, the new name for the mash-up of free software packaged as an operating system might be:

    GinLinG == Gnu is not Linux is not Gnu

    It even has an Asian ring, to match people’s trendy tatoos.

    There, now everyone is happy. :)

    April 6th, 2011 at 11:33

    1. Cleroth

      In 5 years’ time, when I hear the term “GinLinG” I’ll remember this post.

      April 7th, 2011 at 01:19

  12. cpearce

    WTF guys!?! I didn’t even mention “Linux” in my post! Any more comments in response to the “Linux vs GNU/Linux” debate will be deleted.

    June 16th, 2011 at 15:02

  13. Ian

    It would be great to see this buffering for the audio tag too. Maybe it’s there by now. I’m using chrome with mp3 audio, and it doesn’t seem to skip downloading parts it doesn’t need. It would be good if it did byte range requests for the parts that have been seeked to. I will have to get some audio oggs to try out in Firefox.

    Great work Chris, keep it up.

    February 11th, 2012 at 18:39

  14. hajir

    this for all to tell me

    March 26th, 2012 at 00:32

Comments are closed for this article.