Jump to content


Photo

How to have audio/video not auto download on a page?


  • Please log in to reply
3 replies to this topic

#1 phprocker

phprocker
  • Members
  • PipPipPip
  • Advanced Member
  • 91 posts

Posted 15 September 2006 - 09:31 PM

Hey all.  I made a site and used the basic embed tags to include some audio with it not auto playing and the user having to press play for it to play.  Now I would also like it so that the user does not automatically have to download the file everytime he visits the index page to save on their load times.  And I don't want a separate link for the audio.  I want it on the main page but downloaded and played when user presses play.

What is the possible way to do this?  Is this set automatically by autostart=false?

thx

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 16 September 2006 - 02:18 AM

hmmmm.....

I think the most sesnible option to achieve what you want is to open a pop-up window with just the media file....
follow me on twitter @PHPsycho

#3 pkSML

pkSML
  • Members
  • PipPipPip
  • Advanced Member
  • 191 posts
  • LocationBucyrus, Ohio

Posted 18 September 2006 - 09:40 PM

Here is some HTML code I have. You can see it in action at http://philip.calvar.../funny_page.htm.
For me, it doesn't start downloading the clip until 'play' is clicked.

<OBJECT id='mediaPlayer' width='450' height='375' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Video Components. Please Wait...' type='application/x-oleobject'>
<param name='fileName' value='http://philiplance.is-a-geek.com/funnystuff/funny-vidoes-Darth-Vader.wmv'>
<param name='animationatStart' value='true'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value='false'>
<param name='showControls' value='true'>
<param name='loop' value='false'>
<EMBED type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'
bgcolor='darkblue'
src='http://philiplance.is-a-geek.com/funnystuff/funny-vidoes-Darth-Vader.wmv' 
loop='false'>
</EMBED>
</OBJECT>
(The page seems to load 177KB when the HTML size is negligible - so maybe it starts to download the video a little bit - I don't know.)
-Stephen

Need a LitlURL?

Got code to share? --> The Code-Bin

#4 phprocker

phprocker
  • Members
  • PipPipPip
  • Advanced Member
  • 91 posts

Posted 19 September 2006 - 04:47 AM

Hey thanks pkSML.  I came across that exact same code.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users