views:

76

answers:

1

Back in 2000 I made an educational website in which we had hour-long audio files of lectures on a RealAudio server, then I generated hundreds of little SMIL .ra files e.g.

lecture002part053.ra:

...
    <audio src="lecture002.wav" clip-begin="554s" clip-end="612s" />
...

then in the HTML I had links like this:

<a href="http://nnnnn.edu/lecturesparts/lecture002part053.rt"&gt;Play part 53</a>

And when anyone with the RealAudio player would click on the link they would instantly hear only that small portion of the .wav file.

The solution worked well, but the RealAudio Server was a bit expensive and the RealAudio player was unfortunately a kind of adware with ad popups etc.

So ten years later I can imagine there is a better way to do this, what is the best technology today to stream portions of audio files from a web server, namely, with these features:

  • ability to create hyperlinks that play small portions of a large online .mp3 file
  • a built-in player (e.g. Flash or Silverlight), such as this built-in Flash player one at dotnet rocks where -- if you have Flash -- users just see it, click it and it starts playing audio
  • is a free solution and does not require a separate audio server
A: 

I would suggest using Adobe Flex if you are a programmer. Then you could create your own and have it behave anyway you want. Flex is pretty easy for Java or C# programmers to pick up, since the syntax is similar (well minus the MXML part).

I haven't made a MP3 player in Flex 3 but I did make a VideoPlayer with Adobe FlexBuilder. It was very easy to do and with flash/flex you can have the player look very neat (fading in&out play buttons...). There is an example on adobe's site on how to build a podcast player in Flex 3, that reads the source URLs from an RSS feed: http://livedocs.adobe.com/flex/3/html/help.html?content=Working_with_Sound_02.html go here and select the sub-node named: Example PodCast player.

Hitting your points:

ability to create hyperlinks that play small portions of a large online .mp3 file

You could customize the player to take FlashVars, so that it knows only to play a portion of the file. But if this is for sampling before buying I would suggest just having a short version of the sound file.

a built-in player (e.g. Flash or Silverlight), such as this built-in Flash player one at dotnet rocks where -- if you have Flash -- users just see it, click it and it starts playing audio

Flex = Flash, so yes

is a free solution and does not require a separate audio server

No audio server needed but you would need to compile your code. So you would need FlexBuilder(not Free) or FlashDeveloper(Free).

eSniff