FLV Player Installation

STEP 1: Download Flv Player application from the site

1. Go to flv player download page;

2. Click big download button.

 

STEP 2: Install server side scripts to your server

Flv player application is provided in .zip archive.

1. Extract files from downloaded archive;

2. Copy all files and folders to the web server where you are going to install player;

3. Open installation wizard in the browser:

http://www.mysite.com/flv_player/install.php

In the code:

  • www.mysite.com - your website;
  • flv_player - folder, you uploaded flv player to.

4. Follow installation instructions.

 

STEP 3: Include the SWFObject JavaScript library in the head of your HTML page

<head>
    <title>Your Page Title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="swjobjectUrl"></script>
</head>

 In the code: 

  • swjobjectUrl (String, required) specifies the URL of swfobject.js file.
 

STEP 4: Flv player is embedded in HTML page using SWFObject with the following code:

<div id="idBlockFlvPlayer"> 	
   flv player demo container
   This text is replaced by the Flash movie. 	
</div>
<script type="text/javascript">
   var params = {};
   var flashvars = {
      bgcolor: '0x777777',
      vidHandler: 'demos/flv_player/getvid.php',
      adsHandler: 'demos/flv_player/getads.php',
      video_id: 2,
      ad_id: 0,
      show_html: false,
      vid_width: 864,
      vid_height: 480,
      frame_url: 'demos/flv_player/video/coral_reef_adventure.jpg',
      playlist_url: 'demos/flv_player/playlist.xml',
   };
   var attributes = {};
   var swfUrl = 'flvplayer.swf';
   var width = 526;
   var height = 420;
   swfobject.embedSWF(swfUrl, "idBlockFlvPlayer", width, height, "9.0.115",
      js/swfobject/expressInstall.swf", flashvars, params, attributes);
</script>

In the code:

  • swfUrl (string, required) specifies the URL of flv player SWF file;
  • width (number, required) specifies width in pixels of player;
  • height (number, required) specifies height in pixels of player;
  • bgcolor (string, optional) specifies HEX color of player background;
  • video_id (number, required) specifies id of video file;
  • vidHandler (string, optional) specifies script of video handler, gets vide_id and returns url of video file;
  • vid_width (number, optional) specifies width of video frame;
  • vid_height (number, optional) specifies height of video frame;
  • ad_id (number, optional) specifies id of advertisement config;
  • adsHandler (string, optional) specifies script of advertisiment handler, gets ad_ud and returns xml config for banners;
  • playlist_url (string, optional) specifies url for xml config file with playlist of videos.

Detailed information about using SWFObject you can find here.

 
© 2011 FreeWareGadget