Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    21
    Thanks
    12
    Thanked 0 Times in 0 Posts

    HTML5 Video - Start buffering on page load

    Hi,

    From my experience with HTML5 video so far (which isn't much), Firefox seems to switching to the "HAVE_ENOUGH_DATA" state too soon which is causing very choppy playback while the video is buffering. Is there a way to start the loading of video as soon as the page loads instead of waiting for the user to press play? I don't mean "autoplay", I want the video to start buffering as soon as the page loads without it playing.

    Thank you.

  • #2
    Gütkodierer
    Join Date
    Apr 2009
    Posts
    2,127
    Thanks
    1
    Thanked 426 Times in 424 Posts
    HAVE_ENOUGH_DATA is just an estimate, so there's always a chance it might be off. Firefox changed that estimate to a less conservative one a while ago (see https://bugzilla.mozilla.org/show_bug.cgi?id=627153), and that might be what you're seeing here.

    Anyway, use the preload attribute to start buffering immediately. Some browsers might use the autobuffer attribute instead, which has been in the specs originally but has been replaced by preload.
    .My new Javascript tutorial site: http://reallifejs.com/
    .Latest article: Calculators — Tiny jQuery calculator, Full-fledged OOP calculator, Big number calculator
    .Latest quick-bit: Including jQuery — Environment-aware minification and CDNs with local fallback

  • Users who have thanked venegal for this post:

    AmmarIdris88 (12-17-2011)

  • #3
    New Coder
    Join Date
    Nov 2011
    Posts
    21
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Thanks venegal, you solved my problem. Preload works perfectly.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •