EMBEDDING AUDIO OR VIDEO
Embedding Audio Directly
How annoying when you end up on a site and music plays automatically, without even a "player" so you can turn it off. It is very easy but intensely annoying so I won't tell you how to do it
The new way and the old way
Using the EMBED and OBJECT tags used to be the standard way to display a player, (e.g. Quicktime, Realplayer, Windows Media Player) which you could either set to play automatically on loading or that would start when the user clicks on the start icon, however I no longer recommend this way as recent updates to Internet Explorer now display Active X errors when using the Object tag.
You can still see how to use this method but I recommend the new way to make it work much better using a simple javascript.
Using the javascript method (recommended)
- Download and unzip the javascript file AC_Quicktime.js.zip
- Upload this file to your webspace
- Create a link to that file in the <head> section of your page with this code:
<script src="AC_QuickTime.js" language="JavaScript" type="text/javascript"></script>
remembering to change the filepath if you put it in a directory other than the root directory
Then in your page you add the following code:
<script language="JavaScript" type="text/javascript">
QT_WriteOBJECT_XHTML('AUDIOFILE.mp3', '240', '16', '',
'autoplay', 'false',
'kioskmode', 'true'); </script>
- Of course you change AUDIOFILE.mp3 to the name of your file (and change the filepath to whatever directory you put it in.
- 240 is the width of the player - you can change this
- 16 is the height of the player. leave at 16 for audio
- For video change these valuesto the width of the video and the height of the video plus 16
- Autoplay can be false true to suit yor requirements
- kioskmode can be false or true to suit yor requirements (This means whether you can download it or not)


