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

Encoding

Inserting in Web Pages

History

Links
Playlist Scripts

The scripts can be downloaded there :
SP Playlist Scripts - Playlists scripts

Playlists :
StreamPlug® is compatible with .pls playlists. Here's an example of a blank playlist :

[playlist]
File1=http://www.yourwebsite.com/file.ogg
Title1= File Title
Length1=-1
File2=http://www.yourwebsite.com/file2.ogg
Title2= File Title
Length2=-1
NumberOfEntries=2
Version=2


If you need a template simply copy/paste this text in a .txt file and change the extension while saving it to .pls (yourplaylist.pls). You can also launch SP, add each location using the Playlist Box and then save that file.

Using Playlists Instead Of URLs
You can choose to call a .pls instead of a direct url to launch a file. This has many advantages. You can for example call a complete list of files on a simple click instead of just one, which can be of interest when you stream for example whole albums. Playlists can also be a way to hide the URLs of your files in order to protect them from being downloaded. This is done through the playlist Encryptor. You have to contact us to use SP Playlist Encryptor (see below).

StreamPlugShowPl()
This scripts make the playlist box pop up. It is equivalent to clicking the "playlist" button on StreamPlug®'s skin.

Example :

In this case we want the playlist box to pop up when the user clicks a hyperlink.
<body>
<a href="#" onclick=StreamPlugShowPl()>Show Playlist Box </a>
</body>


Note : This script has no other function than to show the playlist box.


StreamPlugHidePl()
Same as above but hides the playlist box.

Example :
<body>
<a href="#" onclick=StreamPlugShowPl()>Show Playlist Box </a>
</body>



StreamPlugAddPlaylist(url)
This is one of the main playlist commands. It will load the player with the playlist you indicate.

Example :
We want the user to pick a playlist he wants on a simple click;
<body>
<a href="#" onclick=StreamPlugAddPlaylist(http://www.yoursite.com/yourplaylist.pls)>Show Playlist Box </a>
</body>


Note : A playlist that is loaded does not start to play automatically. See below StreamPlugAddPlaylistPlay() for that function.

StreamPlugAddPlaylistPlay(url)
This is probably the most useful playlist command. It loads and plays right away the item you have chosen on the playlist.

Example :
You have the following pls saved as album.pls:
[playlist]
File1=http://www.yourwebsite.com/file.ogg
Title1= File Title
Length1=-1
File2=http://www.yourwebsite.com/file2.ogg
Title2= File Title
Length2=-1
File3=http://www.yourwebsite.com/file3.ogg
Title3= File Title
Length2=-1

NumberOfEntries=3
Version=2

File2.ogg is a song you want to promote in particular. So you want it to be the first song to play. By default the javascript contained in StreamPlug-Pl.js has the value playPlItem(0) (play playlist item 0). We want ovveride this value. We need to copy the entire function in our code :

function StreamPlugAddPlaylistPlay(http://www.yoursite.com/album.pls)
{
if(navigator.appName=="Microsoft Internet Explorer")
{
StreamPlugIe.playOnStart(1);
StreamPlugIe.addPl(url);
StreamPlugIe.playPlItem(2);
}
else if(navigator.appName=="Netscape")
{
document.embeds['StreamPlugNs'].playOnStart(1);
document.embeds['StreamPlugNs'].addPl(url);
document.embeds['StreamPlugNs'].playPlItem(2);
}
}

As you notice we edited the function in two steps. We first indicate the location of the .pls to be loaded. Then "Item" from that playlist to be played.


StreamPlugAddPlaylistShow(url)
This function loads a playlist and forces the playlist box to pop up.

Example :
<body>
<a href="#" onclick=StreamPlugAddPlaylistShow(http://www.yoursite.com/yourplaylist.pls)>Load & Show Playlist Box </a>
</body>




StreamPlugAddCPlaylist(url)
This is the same as AddPlaylist(url) but using a playlist encrypted with SP-encryptor. The encryptor is currently not public. You will need to contact us in order to use it. Nothing changes in the use of the script. Extensions of the playlists remain the same.

Example :
<body>
<a href="#" onclick=StreamPlugAddCPlaylist(http://www.yoursite.com/yourplaylist.pls)>Show Playlist Box </a>
</body>




StreamPlugAddCPlaylistPlay(url)
Same as StreamPlugAddPlaylistPlay(url) but using an encrypted playlist (see above).

Example :
<body>
<a href="#" onclick=StreamPlugAddCPlaylistShow(http://www.yoursite.com/yourplaylist.pls)>Click here </a>
</body>




StreamPlugAddC2PlaylistPlay(url,key)
This is the second level of protection of StreamPlug®. As with the first one, there's no public release of the encryptor as of yet.

Example :
<a href="#" onclick=StreamPlugAddC2PlaylistShow(http://www.yoursite.com/yourplaylist.pls,key)>Click here </a>
</body>



StreamPlugAddSPlaylistPlay(url)
If you use this function, users will be prompted whether they want to save the playlist on start or not.

Example :
<body>
<a href="#" onclick=StreamPlugAddSPlaylist(http://www.yoursite.com/yourplaylist.pls)>Select And Save Playlist </a>
</body>




StreamPlugAddCPlaylistShow(url)
This is the same as AddPlaylistShow(url) but using a playlist encrypted with SP-encryptor.

Example :

<body>
<a href="#" onclick=StreamPlugAddCPlaylistShow(http://www.yoursite.com/yourplaylist.pls)>Load & Show Playlist Box </a>
</body>




StreamPlugAddUrl(url,name)
This is used if you want to present a catalogue of files and let users create their own playlist by picking the items they want to listen to or watch.

Example :
<body>
<a href="#" onclick=StreamPlugAddUrl(http://www.yoursite.com/file.ogg, Song 1)>Add This Song To Your Playlist </a>
</body>




StreamPlugAddUrlPlay(url,name)
This is used if you want to present a catalogue of files and let users create their own playlist by picking the items they want to listen to or watch. Items with this function will start playback when clicked.

Example :
<body>
<a href="#" onclick=StreamPlugAddUrlPlay(http://www.yoursite.com/file.ogg, Song 1)>Add To Playlist And Play </a>
</body>




StreamPlugPlayUrlName(url,name)
This function adds an item to the playlist, shows the playlist box, and starts the playback of the item.

Example :
<body>
<a href="#" onclick=StreamPlugPlayUrlName(http://www.yoursite.com/file.ogg, Song 1)>Add This Song To Your Playlist And Play (+Show Playlist)</a>
</body>




StreamPlugNext()
This is the "next" function to skip from one item to the next one in a playlist.

Example :
<body>
<a href="#" onclick=StreamPlugNext()>Skip To Next Item </a>
</body>




StreamPlugPrev()
This is the "previous" function to come back to a former item.

Example :
<body>
<a href="#" onclick=StreamPlugPrev()>Back To Previous Item </a>
</body>



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