Codebasing Clipstream Audio 3 Files
Relative or absolute link all of your Clipstream™ Audio 3 files to a set of common files in order to host on other websites or in various locations in your hosting setup without duplication of the common files.

Requirements:
  • Encoded Clipstream Audio files

In simple hosting with Clipstream™ Audio 3 files you can upload all of the generated files (common files and audio files) to the same folder on your host and they will work. However, when you are hosting large amounts of audio files this can become unweildy. Also, in order to play on other sites (in Clipstream™ Audio 3 Pro) you need to provide code to point to the specific location on your host so that the applet player on other web pages knows where your files are. Pointing to the common files is called codebasing.

Codebasing simply

To codebase, you need to tell the applet / .js code where your common files are located. Common files are the 'player' files that every Clipstream™ Audio applet needs to understand what to do with the audio .csa files the encoder generates. (More on common files here) The codebase is simply an absolute link to the folder where all of these common files exist on your web host.

ex.
If all of your common files are in the root folder of your domain, then your codebase will be:

http://www.mydomain.com

If, however, you wanted to organize these into a separate folder just for audio, you might have put them in an audio/ folder. The codebase would then be:

http://www.mydomain.com/audio/

Where to put audio .csa files?
Your audio files can be anywhere on the same host as long as they correctly link to the folder of the common files by using a codebase statement.

ex.

http://www.mydomain.com/audio/album1

-or-

http://www.mydomain.com/album1/

Inserting codebase code into .js or applet

To codebase you must insert a codebase statement into the .js/ applet code

  1. Locate the folder where your common files are hosted

    ex.
    http://www.mydomain.com/audio/

  2. In each applet / .js code, locate the line of code that begins with

    <applet

  3. Make a space anywhere within that line and add the following code:

    codebase='http://mydomain.com/audio'

    The finished applet line then may look like:

    ex.
    document.writeln( " <APPLET height=52 width=95 alt='Clipstream Audio' archive='clipstreamaudio.zip' code='audioclipstream.class' cabbase='clipstreamaudio.cab,clipstreamaudio_unsigned.cab' codebase='http://www.clipstream.com/' name='clipstreamaudio' MAYSCRIPT> ")

    * actual code from the clipstreamaudio.com website.

Relatively or absolutely linking audio files to codebase location
After you have specified the link to the folder of your common files, you then must ensure your audio files link correctly to that folder location. You can do this relatively or absolutely.

Absolute or relative linking?
Use relative linking when you organize your files in folders that will not change in relation to the common file folder (the codebase location).

ex.
http://www.mydomain.com/audio/album1/ <-- album1/ contains just .csa audio files. The common files folder is in audio/ . It is easy to move the entire audio/ directory in the hosting system. Then only the codebase line needs to be changed.

Use absolute linking when the location of your .csa audio files is not likely to change, but the common files folder may change. Absolute linking is easier for some to understand since you can paste the entire link into a browser to check its location.

ex.
http://www.mydomain.com/players/ <-- the common files folder may be located a separate hierarchy.
http://www.mydomain.com/album1/ <-- album1 contains just .csa audio files and won't be moved

Relatively link .csa audio files to codebase location

  1. Locate the folder where your .csa audio file is hosted

    ex.
    http://www.mydomain.com/audio/album1/

  2. In each applet / .js code, locate the line of code that begins with

    <param name='AudioStreamURL' value='

  3. Before the actual file name, type the subfolder(s) where that .csa audio file is hosted.

    ex.
    If your files are located in album1/ and the common codebased player files are in the audio/ folder above the audio1/ folder then type in:

    <param name='AudioStreamURL' value='album1/song_2_96s.csa'>

    If you have further levels to your audio file hierarchy, just add them in.

    ex2.
    If you have organized by year as well as by album, your audio files might be here:

    http://www.mydomain.com/audio/2009/album1/

    Therefore your relative link will include 2009/album1/:

    ex.
    <param name='AudioStreamURL' value='2009/album1/song_2_96s.csa'>

    * actual code from the clipstreamaudio.com website.

Absolutely link .csa audio files to codebase location

  1. Locate the folder where your .csa audio files are hosted

    ex.
    http://www.mydomain.com/audio/album1/

  2. In each applet / .js code, locate the line of code that begins with

    <param name='AudioStreamURL' value='

  3. Paste the complete URL location of the audio .csa files. .

    ex.

    <param name='AudioStreamURL' value='http://www.mydomain.com/audio/album1/song_2_96s.csa'>

Other files that may need to be linked
Any file that is specific to the audio clip may need to be linked to the codebase.

For example, a specific set of player graphics that are used only for this specific audio clip but not for others may be placed in the same folder as the audio file but not with the common files.


clipstream.com :: copyright © destiny media technologies, inc. | support | investors | broadcast internet radio