The Ultimate Streaming Solution - DivX / XviD Compatible -
SP v2.0
Manual
Getting Started

Encoding

Inserting in Web Pages

History

Links
SP Javascripts

Javascripts are used to insert StreamPlug® inside webpages.
There are 4 .js files available with all the SP commands. You can either link your pages to these .js or copy/paste the functions you need where you want them. It is recommended that you link your pages to the .js hosted by Cedelia on streamplug.com since they are kept updated and new functions come with new releases of the player.

The scripts can be downloaded there :
SP Installation Scripts - The browser detection and installation scripts
SP Commands - Playback commands (play - pause - etc.)
SP Playlist Scripts - Playlists scripts
SP Appearance Scripts - Display scripts (skin, buffer color, background color)

Linking To The .js Files
If you choose the first and recommended method to insert javascripts in your page, copy/paste this code in the <head></head> tag of the pages. This code must be copied in the <head> of each page where you want SP to appear :

<script type="text/javascript" src="http://www.streamplug.com/StreamPlug/html/StreamPlug.js"></script>
<script type="text/javascript" src="http://www.streamplug.com/StreamPlug/html/StreamPlug-Pl.js"></script>
<script type="text/javascript" src="http://www.streamplug.com/StreamPlug/html/StreamPlug-Look.js">
</script>
<script type="text/javascript" src="http://www.streamplug.com/StreamPlug/html/StreamPlug-Cmd.js">
</script>


This method presents the advantage of sparing you to copy the entire functions where you need them, using the following syntax instead :

<SCRIPT LANGUAGE="JavaScript">
<!--
SP-SCRIPT(value);
-->
</SCRIPT>

Where SP-SCRIPT is replaced with the specific function you want to use and value by the value you have to indicate if any.

Copying Each Function Separately
If you do not want to link your pages to the .js, the other solution is to copy the entire function you need directly in your pages. We took here the installation script as an example. The same goes for all the other functions. The syntax will then be something like this :

This is the Installation Script found in StreamPlug.js :

function PutStreamPlug(w,h)
{

if(w<410)w=410;
if(h<80)h=80;
if(navigator.appName=="Netscape")
{
document.write("<EMBED type=application/x-OGM name=StreamPlugNs width=",w," height=",h," >")
}
else if(navigator.appName=="Microsoft Internet Explorer")
{
document.write("<OBJECT ID=StreamPlugIe WIDTH=",w," HEIGHT=",h," codebase='http://streamplug.com/StreamPlug/SP.cab' CLASSID='CLSID:2019DC25-D1C0-11D6-97B3-0008A124F542'><PARAM NAME=width VALUE=0></OBJECT>");
}
else
{
document.write("<p>Browser Not Supported</p>");
}
}

If you choose this method , you have to put this code anywhere in your code for SP to be installed or for the commands to work.

Copying Versus Linking

Copying functions directly in your page will override the scripts linked in the .js files. Copying the functions directly can allow more flexibility, as shown above, since some values are defined by default in the .js scripts. This is particularly true of the installation. Most of the other scripts do not need be copied inside the pages, links towards the .js hosted on streamplug.com are sufficient and more simple to use.

StreamPlug® is a Cedelia technology, © Cedelia 2001 - 2004 - All Rights Reserved. Website layout by Cedelia.
Home | Contact | Support | Privacy Policy