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

Encoding

Inserting in Web Pages

History

Links
Installation Scripts

The scripts can be downloaded there :
SP Installation Scripts - The browser detection and installation scripts

Netscape Installation
NSInstall()
*This script will be commented in the near future*

Inserting SP In A Page.
PutStreamPlug(w,h)
This script will be necessary in any case : it is the script that embeds SP in a document. The two values between parenthesis are width and height, in pixels, of the SP window that will be created. You have to put this script where you want the player to appear.
You can embed SP in any type of tags.

Examples :
<body>
<div><SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>
</div>
</body>
Here, we want a SP window that corresponds to a film encoded at a resolution of 480x360. The width of the window is hence 480. The height is 360 (the height of the movie) + 80 pixels (the height of the player). If we had wanted to hide the player and only have a window with the movie the height would then be 360.

Note that the PuStreamPlug script contained in StreamPlug.js comes with a minimum window size. If you want to override these minimum values, you will have to copy/paste the whole function in your page and not use the syntax above :

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>");
}
}

Take some time to read this particular function from the .js. You notice that it contains information about the minimum size given to SP :
if(w<410)w=410;
if(h<80)h=80;
Which reads :
"if width is inferior to 410 pixels, width is 410 pixels."
"If height is inferior to 80 pixels, height is 80 pixels."

You may want to get rid of these values or edit them, for instance if you want to hide SP's skin and put the buttons on links in your page.

You then notice these lines :
document.write("<EMBED type=application/x-OGM name=StreamPlugNs width=",w," height=",h," >")
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>")

The first is line is the one for Netscape/Mozilla/Firefox and the second for IE. It is in these lines that you define the actual size of your window by indicating the desired values for WIDTH and HEIGHT.




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