Sound on the site

Audio / Listen / Listen

Sound on the site

Example

We paste to <head>

<script 
language="JavaScript" 
src="_RU/player/audio-player.js">
</script>

We paste to <body>

<object type="application/x-shockwave-flash" 
data="_RU/player/player.swf" 
id=audioplayer1 
height=24 width=290>
<param name=movie 
value="_RU/player/player.swf">
</param>
<param name=FlashVars 
value="playerID=1&soundFile=radio-t.com/downloads/rt_podcast139.mp3">
</param>
<param name=quality 
value=high>
</param>
<param name=menu 
value=false>
</param>
<param name=wmode 
value=transparent>
</param>
</object>

Instead of radio-t.com/downloads/rt_podcast139.mp3 write the address of our audio file or podcast.

And you need to download the player script itself and place it in the player folder.

Download the player and sample script can be here


Audio player on HTML5

autoplay - starts playing immediately after the page loads.
controls - the control panel of the player.
loop - loop playback without end.
preload - loading an audio file with the opening of a web page.

You can specify the address of the audio file or the audio stream link, for example, radio.

so

<audio 
src='audiofile.mp3' 
controls preload>
</audio>

Or this

<audio controls preload>
    <source src='audiofile.mp3'/>
</audio>

Or this

<audio controls>
  <source 
  src="audiofile.ogg" 
  type="audio/ogg">
  <source 
  src="audiofile.mp3" 
  type="audio/mpeg">
  Your browser 
  does not support 
  audio player
</audio>

You can give several files to the browser to choose from, he will find what he supports. If it does not support anything, you can suggest text, for example. "Your browser does not support audio player".


In different browsers the player will look different, in some it will not be visible at all.