veluit06 Posted April 6, 2009 Share Posted April 6, 2009 hi in php file how to display a videos, am having 5 videos in my folder, i want to display videos continuous mean want to display 1 to 5 videos continuously, is there any method plz tel me i dntknow this concept how to do. Quote Link to comment Share on other sites More sharing options...
yami007 Posted April 7, 2009 Share Posted April 7, 2009 do u mean a video flash player? Quote Link to comment Share on other sites More sharing options...
veluit06 Posted April 7, 2009 Author Share Posted April 7, 2009 thanku for ur rpy, ya its flash player, if possible plz tel me if the flash player means what i have to do, normal video embed file means what i have to do...any sample sites and code plz reply me Quote Link to comment Share on other sites More sharing options...
yami007 Posted April 7, 2009 Share Posted April 7, 2009 so u say u want to play them one after one endlessly, that means you're using xml, if u do then print your php code here and i shall get u something. if u just think of it and dont know what to write to get the expected results. answer me and i'll get u some.. Quote Link to comment Share on other sites More sharing options...
veluit06 Posted April 8, 2009 Author Share Posted April 8, 2009 hi have a nice day... ya i want to play the video one after one endlessly, 1) am having one folder in that folder 5 video files is there that is windows media fla file 2) when the user opens our php page he plays the video, after then current video wil open, after ending that video(1st video), automatically running next video(2nd video), one after one video should run. friend example youtube video files concept, in that if we play one video, inside some sub videos also there, that same concept, but our concept one after one video should run automatically, plz rpy me, i also tried and searched but am not getting still, Quote Link to comment Share on other sites More sharing options...
yami007 Posted April 8, 2009 Share Posted April 8, 2009 hi again so if you're familiar with adobe flash and php this is gonna be easy, here's the php code that you'll need to display xml from your videos directory <?php echo '<?xml version="1.0" encoding="UTF-8"?>'; echo "\n"; echo '<playlist>'; echo "\n"; if ($handle = opendir('videos')) { $rows = 0; while (false !== ($f = readdir($handle))) { $rows++; if ($f != "." && $f != ".." && $f != "index.php" && $f != "Thumbs.db") { list ($name, $ext) = split ('[.]', $f); echo '<vid src="' . $f . '" desc="' . $name . '"/>'; echo "\n"; } } closedir($handle); } echo '</playlist>'; echo "\n"; ?> and here's the source of what it displays <?xml version="1.0" encoding="UTF-8"?> <playlist> <vid src="BAAD - Kimi ga suki dato sakebitai.flv" desc="BAAD - Kimi ga suki dato sakebitai"/> <vid src="hancock.flv" desc="hancock"/> </playlist> now all u need to do is making the video player play them continusly Quote Link to comment Share on other sites More sharing options...
veluit06 Posted April 9, 2009 Author Share Posted April 9, 2009 hi thanks for this code, if u dntmind can u explain this code plz, am fresh in php, and tel me the procedure where i have to paste this xml code, plz Quote Link to comment Share on other sites More sharing options...
yami007 Posted April 9, 2009 Share Posted April 9, 2009 what i used on the code is generating xml using php, so that video flash player can play the videos from the videos directory automatically u have to call this file from your flash application if u dont much about xml in flash then take this tutorial, ==> http://www.gotoandlearn.com/play?id=65, this will be helpful even if you're still newbie to flash i hope u benefit from this ^^ Quote Link to comment 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.