Tiny audio streamer

General

I found this javascript-controlled audio streamer I made a while ago. It weighs in at a massive 1.2k and is very basic. Maybe you could make it a personal challenge to make it smaller!

Download the swf here. (right click & save).

Source (AS2):
Main.as
MiniStreamer.as

How to use:
Basically you need to embed the swf at whatever size you would like the progress bar to be.
Then play or stop an mp3 using javascript calls playAudio(url); and stopAudio();.

HTML:


<script language="javascript">
function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName];
    } else {
        return document[movieName];
    }
}
function playAudio() {
  // 'AudioStreamer' is the id of the embedded swf
  thisMovie('AudioStreamer').playAudio('test.mp3');
}
function stopAudio() {
  thisMovie('AudioStreamer').stopAudio();
}
</script>

This entry was posted on Friday, June 6th, 2008 at 11:03 am and is filed under General. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

One Response to “Tiny audio streamer”

  1. Chris McQueen Says:

    Do you have an example of this in use posted somewhere?

Leave a Reply