Here is an example of HTML usage of the player:
<object type="application/x-shockwave-flash" data="player_flv_maxi.swf" width="320" height="240"> <param name="movie" value="player_flv_maxi.swf" /> <param name="FlashVars" value="flv=test.flv" /> </object>
In this example, the size of the video is not set. The size of the player is 320 by 240. If you change these parameters, the video size will also change.
Name | Description |
---|---|
Parameter name | Parameter description |
flv | The URL of the FLV video to be played. |
width | Forces the video width. |
height | Forces the video height. |
autoplay | 1 to auto-play |
autoload | 1 to automatically load |
buffer | The number of seconds to buffer. By default set to 5 . |
buffermessage | The buffering message. By default Buffering _n_ , _n_ shown in percent. |
buffercolor | The color of the buffering message |
bufferbgcolor | The background color of the buffering message |
buffershowbg | 0 to hide the background color of the buffering message |
config | The URL of the configuration text file, similar to flv_config_maxi.txt |
configxml | The URL of the configuration XML file, similar to flv_config_maxi.xml |
title | The title shown before loading the video |
titlesize | The size of the title's font. By default set to 20 . |
titlecolor | The color of title. By default set to ffffff . |
margin | The margin of the video with respect to the Flash object. (useful for skins). |
srt | 1 to use SRT subtitles (the file must be at the same place as the video and have the same name, with .srt extension) |
srtcolor | The color of subtitles |
srtbgcolor | The background color of subtitles |
srtsize | Size of the subtitle's font. By default set to 11 . |
showstop | 1 to show the STOP button. |
showvolume | 1 to show the VOLUME button. |
showtime | 1 to show the TIME button, 2 to show the remaining time by default |
showplayer | Player bar display mode : autohide , always or never . |
showloading | Loading bar display mode : autohide , always or never . |
showfullscreen | 1 to show fullscreen button (requires Flash Player 9.0.16.60 or newer) |
showswitchsubtitles | 1 to show the button showing/hiding subtitles |
showmouse | Display of the mouse cursor : always , autohide , never . |
loop | 1 to loop. |
startimage | The URL of the JPEG file (not progressive) to be shown before loading the video |
skin | The URL of the JPEG file (not progressive) to load |
playercolor | The background color of the player bar (not the flash) |
loadingcolor | The color of loading bar |
bgcolor | The background color |
bgcolor1 | The first color of the background gradient |
bgcolor2 | The second color of the background gradient |
buttoncolor | The color of the buttons |
buttonovercolor | Hover color of buttons |
slidercolor1 | The first color of the bar gradient |
slidercolor2 | The second color of the bar gradient |
sliderovercolor | Hover color of the bar |
loadonstop | 0 to stop the video loading by cliking on STOP button |
onclick | The destination URL when clicking on the video. By default playpause , meaning that the video is played/paused on click. To remove events, set to none . |
onclicktarget | The target of the URL when clicking on the video. By default _self . To open a new window set to _blank . |
ondoubleclick | Action on double click: none , fullscreen , playpause , or the URL to open. |
ondoubleclicktarget | The target of the URL when double clicking on the video. By default _self . To open a new window set to _blank . |
playertimeout | The timeout in milliseconds before the player hides (when autohide mode is set). By default set to 1500 . |
videobgcolor | Background color of the flash, when no video is shown. |
volume | The initial volume, between 0 and 200 . |
shortcut | 0 to deactivate keyboard shortcuts. |
playeralpha | The transparency of the player bar, between 0 and 100 . |
phpstream | 1 to use php stream |
srturl | L'URL of the subtitles file (if you don't want the automatic detection) |
top1 | Load an image over the video and place it at the coordinate x and y (for example url|x|y ) |
netconnection | RTMP server url |
showiconplay | 1 to show the PLAY icon in the middle of the video. |
iconplaycolor | The color of the PLAY icon. |
iconplaybgcolor | The background color of the PLAY icon. |
iconplaybgalpha | The transparency of the PLAY icon between 0 and 100 . |
showtitleandstartimage | 1 to show the title and the startimage at the same time. |
Key | Description |
---|---|
Key | Description |
space | Play/Pause |
P | Play/Pause |
S | Stop |
C | Show/Hide subtitles |
F | Fullscreen mode |
left | 5 seconds backward |
right | 5 seconds forward |
up | Volume up |
down | Volume down |
+ | Volume up |
- | Volume down |
To control the player with Javascript, it is necessary to add an id
in the <object>
tag, in order to identify the Flash.
These are the available actions:
// PLAY document.getElementById("myFlash").SetVariable("player:jsPlay", ""); // PAUSE document.getElementById("myFlash").SetVariable("player:jsPause", ""); // STOP document.getElementById("myFlash").SetVariable("player:jsStop", ""); // Pour modifier le volume document.getElementById("myFlash").SetVariable("player:jsVolume", "50"); // Pour modifier l'url du FLV (il faut faire un play ensuite) document.getElementById("myFlash").SetVariable("player:jsUrl", "http://my.flv"); // Pour modifier l'image de départ document.getElementById("myFlash").SetVariable("player:jsStartImage", "foo.jpg"); // Pour se déplacer dans la vidéo, en seconde document.getElementById("myFlash").SetVariable("player:jsSetPosition", "234");