StreamPlug is an advanced media player for the web : It decodes MPEG4 video streams such as h264, and vorbis audio from a remote file using a simple http server.
This JQuery plugin will help you add a streamplug player on your website/blog, a single line is sufficient to display the player to the right size, and play the media on the fly, without any buffering time !
Streamplug installer:click here
Demo:click here
Download source: click here
Plugin Homepage:click here
Here is a demonstration on how to use it in your web contents:
STEP 0 : PREREQUISTES
- Jquery
- JStreamPlug plugin
- StreamPlug
STEP 1 : HEADER INCLUDES
<script type=’text/javascript’ src=’jquery.min.js’></script>
<script type=’text/javascript’ src=’jquery.JStreamPlug.js’></script>
STEP2 : ADD THE CONTROL TO YOUR HTML PAGE
<div class=”player”></div>
STEP 3 (FINAL) : CREATE A JSTREAMPLUG INSTANCE
<script>
$(‘div.player’).StreamPlug(‘http://sampleserver/samplefile’,720,400,’lite’);
</script>
Syntax : $(element).StreamPlug(url,width,height,skin_name);
Here are described some key functionalities you can run after calling the plugin:
//Get Attributes
///////////////////Get Plugin Window Width
$().SpvideoWindowWidth()//Get Plugin Window Height
$().SpvideoWindowHeigth()//Get Plugin Skin Width
$().SpskinW()//Get Plugin Skin Height
$().SpskinH()//Get Plugin Version Number
$().Spcurversion()//Get current volume
$().Spvolume()//Get current play position in kb
$().SpplayPositionKb()//Get current play position in ms
$().SpplayPositionMs()//Get current received stream kb amount
$().SpstreamPositionKb()//Get current file lenght in kb
$().SpfileLenKb()//Get Current File Url
$().SpgetUrl()//Test if StreamPlug is Playing
$().SpisPlaying()//Playlists
/////////////Add an url in the playlist
$().SpaddUrl(url)//Add pls to the Playlist
$().SpaddPl(url)//Add An Url With Name
$().SpaddUrlName(url,title)//Add Crypted Playlist
$().SpaddCryptedPl(url)//Add Subtitle File/Url
$().SpaddSrt(file,title)//Add Saveable url to playlist
$().SpaddSaveAblePl(url)//Add .plc to the Playlist
$().SpaddCryptedPl2(url,key)//Empty the Playlist
$().SpresetPl()//Load specified skin
$().SploadSkin(url,Name)//Move Playlist Window
$().SpmovePlWin(x,y)//Pause Current Stream
$().Sppause()//Play An Url
$().SpplayUrl(url)//Play Item # in Playlist
$().SpplayPlItem()//Play Current Stream
$().Spplay()//Play and Save Url
$().SpplaySaveableUrl(url)//Play Prev Item
$().Spprev()//Play Next Item
$().Spnext()//Start After n Kb
$().SpstartAfterKb(KB)//Stop Current Stream
$().Spstop()//Play Item From db
$().SpplayUrlFromDb(id)//Play a cgi sec file
$().Spplaycgi2(url,fid,user,pass)//Play a cgi file
$().SpplayCGi(url,id)//Play Multiple (audio/video separated)
$().SpplayMutiple(VideoFile,AudioFile)//Set Video Size
$().SpsetVideoSize(w,h)//Set Original Size
$().SpsetVideoSizeOrig()//Set Loop mode
$().SpsetLoop(state)//Set BackGround Color
$().SpsetBKColor(R,G,B)//Set Video Ratio
$().SpsetRatio(w,h)//Set Volume
$().SpsetVolume(vol)//Set Play-on-Start Attribute
$().SpplayOnStart(state)//Set Full Screen
$().SpsetFullScreen(state)//Set if user Can Resize
$().SpcanResize(state)//Set if user Can Download
$().SpCanDownload(state)//Set Border Size
$().SpsetBorderSize(size)//Set Border Color
$().SpsetBorderColor(R,G,B)//Set Active Srt (-1 none)
$().SpsetActiveSrt(id)//Reset Srt
$().SpresetSrt()//Set playmode
$().SpsetPlayMode(mode)//Set Video Url
$().SpsetVideoUrl(url)//Set Video Url Ms
$().SpsetVideoUrlMs(url,ms,endplay)//Set Video Url Ms +ID
$().SpsetVideoUrlMsWithId()//Set Event Grid Pos
$().SpsetEventGridPos(x,y,Id)//Set Event Grid Size
$().SpsetEventGridSize(w,h)//Set Event Js
$().SpsetEventJS(ID)//Set pos kb
$().SpsetPositionKb(KB)//Set pos ms
$().SpsetPositionMs(ms,endplay)//Set color of A/V buffers
$().SpsetBufferColor(R,G,B)//Windows
///////////Show Pluggle Version
$().SpshowVersion(state)//Show the playlist window
$().SpshowPlaylist(state)//Show Option Window
$().SpshowOption(state)//Show Server Version
$().Spservversion()