views:

955

answers:

3

Is there a way to loop a video with SWFObject Ive tried

so.addVariable('repeat', 'true');
so.addVariable('repeat', 'list');
so.addVariable('repeat', 'always');
A: 

I think the variable name is 'loop'. Could you try to use that instead of 'repeat'?

ylebre
thanks but that doesnt work either :(
chris
A: 

You need to use the "loop" parameter rather than "repeat":

<param name="loop" value="true">

Although the loop parameter does not work on Flex applications. This could be your problem!

TandemAdam
+1  A: 

Hi all

I think there's a little bit of confusion here.

  1. SWFObject doesn't control videos, it only embeds the SWF. It is not a video player. Any playback control for a video needs to be handled by a SWF-based video player, such as the JW FLV Player.

  2. Using loop=true means you're looping the embedded SWF, not a video playing within the SWF. (this is controlled via the 'param' settings, not addVariable). Note that loop=true is the default setting for Flash SWFs and doesn't need to be specified.

  3. If you're using addVariable, you're passing a variable to the SWF using Flashvars. I suspect this means you're trying to tell your Flash-based video player (not SWFObject) to loop the video; the exact variable required depends on the video player you're using. Two of the most popular players are the FlowPlayer and the JW FLV Player. If you're using one of those players, I suggest checking their sites for documentation.

Please note that SWFObject is now at version 2.2; the addVariable syntax was last supported in version 1.5. I suggest upgrading to version 2.x since it has a significant bugfix related to SWFs that play videos. http://code.google.com/p/swfobject/

pipwerks