My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
HowToUse  
Hot to use the FLV Player
Updated Dec 5, 2011 by florianp...@gmail.com

Hot to use the FLV Flash Fullscreen Video Player

There are various methods to use the FLV Player

  • Links
  • iFrame
  • SWFObject
  • JavaScript Playlists
  • ActionScript
You can find examples in the download.

How to use the FLV Player using links

The flvplayer contains an HTML page called flashvideoplayer.html. You can link to this page and transfer the parameters in the query strings.

http://www.yourdomain.com/flvplayer/flashvideoplayer.html?video=content/demo-video.flv

If you have more than one parameter, add them with an "&".

http://www.yourdomain.com/flvplayer/flashvideoplayer.html?video=content/demo-video.flv&skin=skin-applestyle.swf

How to embed the FLV Player using an iFrame

You can integrate the player with an iframe. Just change the URL to flashvideoplayer.htmland the parameters (see previous section).

<iframe src=".../flvplayer/flashvideoplayer.html?video=content/demo-video.flv" width="450" height="400" frameborder="0" scrolling="no"></iframe>

How to embed the FLV Player using SWFObject

SWFObject is an easy-to-use and standards-friendly method to embed Flash content, which utilizes one small JavaScript file. You can pass the parameters to player with 'flashvars'.

HTML head:

<script type="text/javascript" src="../flvplayer/swfobject.js"></script>

<script type="text/javascript">
	var playervars = {    
		contentpath: "../flvplayer/content",
		video: "demo-video.flv",
		preview: "demo-preview.jpg",							
	        skin: "skin-applestyle.swf",
		skincolor: "0x2c8cbd"
		// ...
		//see documentation for all the parameters		
	};	
  			
		var params = { scale: "noscale", allowfullscreen: "true", salign: "tl", bgcolor: "#ffffff", base: "." };  	
		var attributes = { align: "left"};
		
	swfobject.embedSWF("../flvplayer/flvplayer.swf", "videoCanvas", "500", "450", "9.0.28", "../flvplayer/expressInstall.swf", playervars, params, attributes);
         
		// Playlist
</script>

HTML body:

	<div id="videoCanvas" style="margin:0px">
	
	    <p>This content requires the Adobe Flash Player.</p>

		<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a>
	    </p>

	</div>

How to create a JavaScript playlist

Important: This features doesn't work locally (security reasons). Either, upload it on a web server or put the folder with the FLV Player into a trusted zone (link).

Let's say you have integrated the player using SWFObject with playervars:

        ...
	var playervars = {    
		contentpath: "../flvplayer/content",
		video: "demo-video.flv",
		preview: "demo-preview.jpg",							
	        skin: "skin-applestyle.swf",
		skincolor: "0x2c8cbd"
		// ...
		//see documentation for all the parameters		
	};
     ...

This examples shows you how to update the player with the JavaScript function updatePlayer. If video1 (= HTML element, e.g. button, table row, etc.) is clicked, a reference to the video player is saved in the variable player. Then playervars.video is set to another video file. After that, the player is updated.

window.onload = function() {     
					document.getElementById("video1").onclick = function() {  		
						var player = swfobject.getObjectById("videoCanvas");  													    
  						playervars.video = "demo-video2.flv";
 						player.updatePlayer(playervars);					
					}; 
Comment by bernhard...@gmail.com, Jan 14, 2010

Hello,

I am trying to embed it using the object tag but I cannot adjust the width of it. Here is my actual HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
<title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript" src="/flvplayer/swfobject.js"></script> <script type="text/javascript">
swfobject.registerObject("myFlashContent", "9.0.0");
</script>
</head> <body>
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="500" height="400" id="myFlashContent" align="left">
<param name="movie" value="/flvplayer/flvplayer.swf" /> <param name="width" value="500" /> <param name="base" value="." /> <param name="allowfullscreen" value="true" /> <param name="autoscale" value="true" /> <param name="flashvars" value="video=/videos/video.flv&preview=/flvplayer/led-lounge.jpg&autoscale=true" />

<!--!IE?>--> <object type="application/x-shockwave-flash" data="/flvplayer/flvplayer.swf" width="500" height="400" align="left"> <param name="width" value="500" /> <param name="base" value="." /> <param name="allowfullscreen" value="true" /> <param name="autoscale" value="true" /> <param name="flashvars" value="video=/videos/video.flv&preview=/flvplayer/led-lounge.jpg&autoscale=true" />
<!--<!endif?--> <a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a> <!--!IE?>--> </object> <!--<!endif?-->
</object>
</div>
</body>

</html>

How can I do that? Thanks!

Regards Bernhard

Comment by bernhard...@gmail.com, Jan 14, 2010

Problem solved after a few hours: I had to set autoscale = false before videowidth and videoheight. Maybe you could add this in the Wiki.

So thanks for that great player! :-)

Comment by sylvestre.ledru, Jan 19, 2011

The title should be updated: "Hot to use" => "How to use"

Comment by johnpras...@gmail.com, May 14, 2012

One of the most easy way to embed FLV video into your HTML page is to use the video service like YouTube?, Vimeo etc. In other words you need to upload your video to the video service and then use the share button and copy the embed code.

www.hdwebplayer.com


Sign in to add a comment
Powered by Google Project Hosting