Jump to content

want to display videos continuously


veluit06

Recommended Posts

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..

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,

 

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

;)

 

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 ^^

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.