Documentation :: PHP Functions :: flv

flv - embeds an flv video. This function requires AC_RunActiveContent.js and rac.js. If you use it, make sure you use the flvheader function in the head section of your html document.

Description

void flv (string $movie [, int $width [, int $height [, string fgcolor [, string bgcolor [, boolean $autoplay [, boolean $autoload [, boolean $autorewind [, int $volume [, boolean $loop [, boolean $mute [, boolean $muteonly [, string $clickurl [, string $clicktarget ]]]]]]]]]]])

Parameters

movie - The path of the flv file to send to the player. May be relative or absolute.

width - The desired width of the player. If not specified or set as -1, the function will use the width provided by the getflvsize function. If used, height must also be specified, and a value other than -1, otherwise, both values will be ignored.

height - The desired height of the player. If not specified or set as -1, the function will use the height provided by the getflvsize function, plus 40px for the player’s controls. If used, width must be specified, and a value other than -1, otherwise, both values will be ignored.

fgcolor - The foreground color of the player. Defaults to 0×13ABEC.

bgcolor - The background color of the player. Defaults to 0×051615.

autoplay - If set to true, the movie will begin playing as soon as it has started to load - otherwise it will require the play button to be pressed. Defaults to false.

autoload - If set to true, the movie will load automatically - otherwise it will require the play button to be pressed. Setting this to false can save bandwidth and make pages with multiple videos run better. Defaults to true.

autorewind - If set to true, the movie will return to the beginning after it has completed - otherwise it will stay on the last frame. Defaults to true.

volume - The starting volume of the player. This can later be changed by the user, unless muteonly is set to true. Defaults to 70.

loop - If set to true, the movie will restart after it has completed - otherwise it will stay on the last frame or go back to the beginning, depending on the value of autorewind. Defaults to false.

mute - If set to true, the movie will start muted - otherwise it will start with volume equal to the value of volume. Defaults to false.

muteonly - If set to true, the player will use the old style volume toggle - otherwise it will use the volume adjuster. Defaults to false.

clickurl - If set, clicking the video will take you to this url.

clicktarget - Used only if clickurl is specified, set to ‘_blank’ to open in a new window, ‘_self’ to open in the current frame or ‘_parent’ to open in the current window. Be aware that some popup blockers will prevent opening in a new window.

< Back

PHP Functions
Installation
FAQ

20 Responses to “Documentation :: PHP Functions :: flv”

  1. Walter Conti says:

    Is there any implementation of OS FLV with ColdFusion that you know?
    Thank you very much.
    Walter Conti

  2. admin says:

    None that I know of. If I get a chance I’ll port it - got to get a copy of Cold Fusion first.

  3. James Soderborg says:

    Do you know of a way to start the player playing a .flv file, but only have it play for 10 seconds and then stop?

  4. Martijn Lindhout says:

    Does the FLV player support RMTP locations?

  5. Chuck says:

    i’d like to play .flv file on a different server. i’ve tried flv(”http://www.somewebsite.com/demo.flv”, -1, -1, ”, ”, false, false); but no use. is there any way to play .flv files on a different server?

  6. marvin says:

    how do you change tracker color

  7. Ryan says:

    I believe there may be a bug with autorewind. When set to “off” or “false” the video rewinds and starts playing again (and the play/pause button doesn’t change). When it is set to “on” or “true” it works as expected (returns to beginning and stops)

  8. santhoshreddy says:

    i want to display the stop & play buttons, Please give me code

  9. şömine says:

    is it suitable with joomla ??

  10. Rama Reddy says:

    Hello,
    Iam able to play the first 2 flv video and after i can not play the videos In IE6 and IE7. its work fine firefox. how can i fix this?
    please support me in this reagards.

    Thanks inadvance.
    here is the below code iam using to to pass source to palyer.

    var src = ‘player’;
    if(!DetectFlashVer(9, 0, 0) && DetectFlashVer(8, 0, 0))
    src = ‘player8′;
    AC_FL_RunContent(’codebase’, ‘http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0′, ‘width’, 548, ‘height’, 460, ’src’, src, ‘pluginspage’, ‘http://www.macromedia.com/go/getflashplayer’, ‘id’, ‘flvPlayer’, ‘allowFullScreen’, ‘true’, ‘movie’, src, ‘FlashVars’,'movie=http://andhratube.com/output/{$vinfo[0].flvdoname}&autoload=on&volume=70′);

    plase make me a solution as early as posiible.

    Regards
    Rama Reddy

  11. |--A--| says:

    Is there a way to add your own logo in the player? If yes then how? Thanks, very nice player btw. :-)

  12. Andy says:

    You might want to provide an argument which lets you set the id attribute of the player, in case you want to put more than one player per page.

  13. nickf says:

    instead of having a really really long function signature (14 parameters!) why not use a single “options” parameter, like how jQuery does with most things. the function calls would look like this: flv(array(”movie” => “myMovie.flv”, “mute” => true, “clickurl” => “example.com”));

  14. Gareth N says:

    Does this work with RTMP connections?

  15. Aditya says:

    Hi, I am able to run the flv video using the script generated by the html provided with in the zip file. But when I tried to replace the path with the URL the video is not getting played instead an error is showing up from adobe flash player.

    My code is follows:

    AC_FL_RunContent(’codebase’, ‘http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0′, ‘width’, ‘360′, ‘height’, ‘290′, ’src’, ((!DetectFlashVer(9, 0, 0) && DetectFlashVer(8, 0, 0)) ? ‘player8′ : ‘player’), ‘pluginspage’, ‘http://www.macromedia.com/go/getflashplayer’, ‘id’, ‘flvPlayer’, ‘allowFullScreen’, ‘true’, ‘movie’, ((!DetectFlashVer(9, 0, 0) && DetectFlashVer(8, 0, 0)) ? ‘player8′ : ‘player’), ‘FlashVars’, ‘movie=http://localhost:8080/flv/testFLV.flv&bgcolor=0×051615&fgcolor=0×13ABEC&volume=70&autoload=on&autorewind=on&clickurl=&clicktarget=’);

  16. admin says:

    Is the player able to access the local server that the video is on? That could be the problem.

  17. kkyy18 says:

    Is there way to play to flv that loaded by a php file?

    I tried this, but no luck.
    flv(”http://www.somewebsites.com/get.php?id=1”, -1, -1, ”, ”, false, false);

    or the file name must be absoulte local path with file name and extension?

  18. admin says:

    See the documentation section for info on loading movies with PHP. go to http://www.osflv.com/Documentation.html

  19. Francesco says:

    Loop parameter not working, it’s a bug?

  20. Finn-Arne Johansen says:

    When using the flv function I dont get no “startup image”. I had to edit flash.php to automaticly add an empty ‘&postimage=’

    not sure what happens if I add a postimage.

Leave a Reply

Copyright Jambo Media, LLC 2009

Powered by WordPress - Created by Tommaso Baldovino