• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

load vidoe after page loads?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

medo145

Member
Joined
Jun 11, 2004
Is there a way to have a mp4 video integrated into a page, but have it load after the page has loaded, so people wouldn't have to wait for the video to load before they can see the page. Another option would be that the video loaded if they hit play.

Any suggestions?
 

JamesMore

Member
Joined
Apr 21, 2009
on most players you can set to auto start

then in your javescript you can use the onload function to start the player eg

<BODY onLoad="alert('hello world!')">
 

JigPu

Inactive Pokémon Moderator
Joined
Jun 20, 2001
Location
Vancouver, WA
If you're down with using HTML 5, you could try using the new video tag. If I understand correctly, it should buffer data in the background. YouTube has an HTML 5 demo up, with the actual video player using the following code:

Code:
<video width="640" height="360" src="/demo/google_main.mp4?2" autobuffer>
     <div class="video-fallback">
           <br>You must have an HTML5 capable browser.
     </div>
</video>

JigPu