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

Encoding

Inserting in Web Pages

History

Links
Commands Scripts

The scripts can be downloaded there :
SP Commands - Playback commands (play - pause - etc.)


StreamPlugPlayUrl(url)
This is the command to use to launch a file (audio or video). You can of course put this script in any type of tag you want. For instance putting it in the <body> tag using an onLoad function will make the file launch upon loading of the page.

Example :
In this example, we want to have SP launching a file on clicking a hyperlink.
<body>

<a href="#" onclick=StreamPlugPlayUrl("http://www.website.com/file.ogm")> Title </a>
<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>

Note :
using this command will let the url of your file(s) appear in clear in the source code of your pages.


StreamPlugPlayUrlSave(url)
This is the same as above with a significant difference : your user will be prompted to choose whether to save the file he is going to watch or listen to. If he chooses to say yes, he will have to choose a location on his computer, as you would with any download. The movie/audio file will then start and be saved as it is watched/listened to. Note that while recording a file, a user can not seek inside the file.

Example :
We want SP to launch and the user to be promted when he click on a hyperlink :
<body>
<a href="#" onclick=StreamPlugPlayUrlSave("http://www.website.com/file.ogm")> Title </a>
<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>

Note : This command is very useful if you want to distribute a file and give instant access to it.


StreamPlugLoadUrl(url)
This command loads the player with the url of a file without launching it. You can for example list several files on one page and use this function to let the user load one or more or all of the files offered and then only launch them, hence letting him program hours of content to be streamed.


Example :
<body>
<a href="#" onclick=StreamPlugLoadUrl("http://www.website.com/file1.ogm")>Title1</a>
<a href="#" onclick=StreamPlugLoadUrl("http://www.website.com/file2.ogm")>Title2</a>
<a href="#" onclick=StreamPlugLoadUrl("http://www.website.com/file3.ogm")>Title3</a>

<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>



StreamPlugPlay()
This command corresponds to the button "play" on the player. It is interesting to use if you have decided to hide the player and to put the commands on your own set of buttons without making a new skin. You can put that command on anything you want : an image, a flash object, a simple hyperlink, etc. etc.

Example

<body>
<a href="#"><img src="play.gif" width="30" height="40" border="0" onClick="StreamPlugPlay()"></a>
<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>



StreamPlugPause()
This command is the same as above for pause.

Example :
<body>
<a href="#"><img src="pause.gif" width="30" height="40" border="0" onClick="StreamPlugPause()"></a>
<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>



StreamPlugLoopModeOn()
This command puts the player on "repeat" mode.

Example :
<body>
<a href="#"><img src="loop.gif" width="30" height="40" border="0" onClick="StreamPlugLoopModeOn()"></a>
<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>



StreamPlugLoopModeOff()
Same as previous but sets the mode off.

Example :
<body>
<a href="#"><img src="loop.gif" width="30" height="40" border="0" onClick="StreamPlugLoopModeOff()"></a>
<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>



StreamPlugSetFullScreen()
Full screen command.

Example :
<body>
<a href="#"><img src="fullscreen.gif" width="30" height="40" border="0" onClick="StreamPlugSetFullScreen()"></a>
<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>



StreamPlugSetWindowed()
Full screen mode off.

Example :

<body>
<a href="#"><img src="fullscreen.gif" width="30" height="40" border="0" onClick="StreamPlugSetWindowed()"></a>
<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>



StreamPlugResizeVideo(x,y)
This allows you to resize a video to anything you want.

Example :
<body>
<a href="#" onclick=StreamPlugPlayUrl("http://www.website.com/file.ogm");StreamPlugResizeVideo (680,660) > Title </a>
<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>



StreamPlugSetRatio(x,y)
This allows you to force a certain aspect ratio for your videos : 16/9; 4/3, or a custom aspect ratio.

Example :
<body>
<a href="#" onclick=StreamPlugPlayUrl("http://www.website.com/file.ogm");StreamPlugSetRatio (16,9)> Title </a>
<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>



StreamPlugResizeVideoOrig()
This command forces the window size to be that of the video. If your video is 480x360, then using this command will make your video window 480x360 in size.

Example :
<body>
<a href="#" onclick=StreamPlugPlayUrl("http://www.website.com/file.ogm");StreamPlugResizeVideoOrig()> Title </a>
<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>



ShowVersion()
This command can be useful for your users to check that they have the most recent version of streamplug, in case you use the latest commands/features.

Example :
<body>
<a href="#"><img src="version.gif" width="30" height="40" border="0" onClick="ShowVersion()"></a>
</body>



StreamPlugAddSrt(url,name)
This command allows you to pre-load a subtitle file. StreamPlug® supports .srt files. The first value is the url of your .srt file. The second is the name that will appear in the player for your users to choose their language.
Note that this command will NOT make the subtitles display automatically : it is up to the user to activate them or not, by clicking on the "Subtitles" button on the player and choosing his language.

Example :
You can pre-load any number of subtitle files. You can have them preloaded when your user clicks on a file to play or let him choose to pre-load them by putting the command on a separate link. In the following example, we want the subtitles to be preloaded when a user clicks on a file to play.
<body>
<a href="#" onclick=StreamPlugPlayUrl("http://www.website.com/file.ogm"); StreamPlugAddSrt(http://www.yoursite.com/englishsubs.srt,English) > Title </a>
<SCRIPT LANGUAGE="JavaScript">
<!--
PutStreamPlug(480,460);
-->
</SCRIPT>

</body>

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