colap Posted February 3, 2011 Share Posted February 3, 2011 Is there any PHP function to play .flv flash video file? That PHP function will automatically generate html embed code. Any code? Quote Link to comment https://forums.phpfreaks.com/topic/226557-playing-flv-file-with-php/ Share on other sites More sharing options...
JonnoTheDev Posted February 3, 2011 Share Posted February 3, 2011 PHP has no association with flash at all. They are 2 completely different entities. To play a flv video in a browser you require a player such as JW Player. The players are usually controlled via Javascript objects. Of course you can use a php function to create the HTML / Javascript if you wish i.e <?php function videoPlayer($flv) { $html = "<script>\n"; // javascript script code here $html .= "</script>\n"; return $html; } print videoPlayer('/path/to/test.flv'); ?> http://www.longtailvideo.com/players Quote Link to comment https://forums.phpfreaks.com/topic/226557-playing-flv-file-with-php/#findComment-1169360 Share on other sites More sharing options...
colap Posted February 3, 2011 Author Share Posted February 3, 2011 Can you please post that PHP code? Quote Link to comment https://forums.phpfreaks.com/topic/226557-playing-flv-file-with-php/#findComment-1169368 Share on other sites More sharing options...
JonnoTheDev Posted February 3, 2011 Share Posted February 3, 2011 What code? Quote Link to comment https://forums.phpfreaks.com/topic/226557-playing-flv-file-with-php/#findComment-1169382 Share on other sites More sharing options...
T-Vision Posted February 3, 2011 Share Posted February 3, 2011 HI The best way to get flash and php is to echo the video url in xml format using php. Then read the xml into a flash .swf and load the url into a movie object Quote Link to comment https://forums.phpfreaks.com/topic/226557-playing-flv-file-with-php/#findComment-1169384 Share on other sites More sharing options...
colap Posted February 3, 2011 Author Share Posted February 3, 2011 What code? This code: function videoPlayer($flv) { $html = "<script>\n"; // javascript script code here $html .= "</script>\n"; return $html; } Quote Link to comment https://forums.phpfreaks.com/topic/226557-playing-flv-file-with-php/#findComment-1169421 Share on other sites More sharing options...
BlueSkyIS Posted February 3, 2011 Share Posted February 3, 2011 that is the php and it is posted. ??? Quote Link to comment https://forums.phpfreaks.com/topic/226557-playing-flv-file-with-php/#findComment-1169432 Share on other sites More sharing options...
gergy008 Posted February 3, 2011 Share Posted February 3, 2011 that is the php and it is posted. ??? o.o I know like wtf Quote Link to comment https://forums.phpfreaks.com/topic/226557-playing-flv-file-with-php/#findComment-1169548 Share on other sites More sharing options...
JonnoTheDev Posted February 3, 2011 Share Posted February 3, 2011 We will not do the job for you. This forum is about assisting people with issues in their scripts or suggesting solutions to problems. If you want someone to do the job for you I suggest you post in the freelance board for paid help. We do expect you to at least have a go at tackling the problem before asking for help. As I have already stated, php is not used in client side technologies (unless used via AJAX, different topic..) such as flash, php is a server side technology. Video players that support flv, HTML5, etc, are controlled through Javascript API's. One of the most popular is JW Player. The documentation is clear and easy to understand. Please read if you require a video player on your website to play your flash video files. http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5 Quote Link to comment https://forums.phpfreaks.com/topic/226557-playing-flv-file-with-php/#findComment-1169638 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.