I'm trying to create a playlist of static videos, and my code isn't working at all... I'm sure it's my lack of understanding. I'd like this one playlist to auto-play, while the rest of the videos on my site do not.

<?php
$files = array('http://www.svherald.com/video/file1.flv', 'http://www.svherald.com/video/file2.flv', 'http://www.svherald.com/video/file3.flv');
print swf($files, array('params' => array('width' => '400', 'height' => '300')),array('$flashvars' => array('autoplay' =>'true'))););
?>

I'm screwing up the arrays somewhere in here, but I don't understand enough about what I'm doing to be able to troubleshoot it. Can anyone tell me where I fubar'ed this?

Comments

gausarts’s picture

I think you need to remove the third array:

print swf($files, array('params' => array('width' => '400', 'height' => '300'),
                          'flashvars' => array('autoplay' =>'true')));

djudd’s picture

You're right, the third array was wrong. But the player still doesn't autoplay. I'm using Flowplayer3, any ideas on how to pass the autoplay flashvar correctly?

And thanks so much for your help.

gausarts’s picture

I hardly play around much with Flowplayer. Just a blind shot and not sure myself at all :D, but have you tried changing the case to autoPlay?

djudd’s picture

I found my answer, the case was a problem, but I also needed to pass the autoPlay as 'othervars' instead of flashvars.

Thanks again for all your help.

gausarts’s picture

IC. Glad that it works :)

ron williams’s picture

Status: Active » Closed (fixed)