Welcome Guest, Not a member yet? Register   Sign In
Auto Play Problem
#1

[eluser]saad06[/eluser]
I am having problem in making the flv player auto play can anyone help me here is my code

Code:
$output .= "\n" . '<div id="container' . $videoid . '"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
' . "\n";
        $output .= "\n" . '[removed][removed]' . "\n";
        $output .= '[removed]' . "\n";
        $output .= 'var s' . $videoid . ' = new SWFObject("' . $site_url . 'public/app/mediaplayer.swf","mediaplayer' . $videoid . '","' . $width . '","' . $height . '","7");' . "\n";
        $output .= 's' . $videoid . '.addParam("allowfullscreen","true");' . "\n";
        $output .= 's' . $videoid . '.addParam("autorun","true");' . "\n";//parameter for autoplay
        $output .= 's' . $videoid . '.addVariable("width","' . $width . '");' . "\n";
        $output .= 's' . $videoid . '.addVariable("height","' . $height . '");' . "\n";
        $output .= 's' . $videoid . '.addVariable("file","' . $site_url .'' . $video . '");' . "\n";
        //$output .= 's' . $videoid . '.addVariable("image","' . $site_url .'' . $picture . '");' . "\n";
        $output .= 's' . $videoid . '.write("container' . $videoid . '");' . "\n";
        $output .= '[removed]' . "\n";
#2

[eluser]InsiteFX[/eluser]
Try this instead of:
Code:
$output .= 's' . $videoid . '.addParam("autorun","true");' . "\n";//parameter for autoplay

// See if this works!
$output .= 's' . $videoid . '.addParam("autostart","true");' . "\n";//parameter for autoplay

Not sure, but thats how most flv player start it.

InsiteFX
#3

[eluser]saad06[/eluser]
Thanks for the reply.
I have also tried this code but it is not working
#4

[eluser]InsiteFX[/eluser]
Code:
$output .= 's' . $videoid . '.addParam("autorun","true");' . "\n";//parameter for autoplay

// See if this works!
$output .= 's' . $videoid . '.addParam("play","true");' . "\n";//parameter for autoplay


Adobe Flash Parameters

SWFObject Documentation

InsiteFX
#5

[eluser]saad06[/eluser]
I tried your code but no success :down:
#6

[eluser]saad06[/eluser]
Thanks a lot i have solved the problem i changed the code to
Code:
$output .= 's' . $videoid . '.addVariable("autostart","true");' . "\n";
i just changed addParam to addVariable




Theme © iAndrew 2016 - Forum software by © MyBB