HowToJoomla!
Go to group page Set videos to Autoplay with YouTube Embedder
Share this
YouTube Embedder has got to be one of the (if not the) cleanest, easiest to use plugins I've ever seen.
One thing would make it perfect... Is there a way to change the url so that the videos will play automatically?
One thing would make it perfect... Is there a way to change the url so that the videos will play automatically?
Discussion started by Harry , on 28 February 12:49 AM
Replies
Lisa Winters, Thursday, 01 April 2010 04:43
Autoplay youtube for YouTube Embedder
On line 54 of youtubeembed.php (modules/content/..)
replace:
return '<object width="'.$width.'" height="'.$height.'"><param name="movie" value="http://www.youtube.com/v/'.$vCode.'"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/'.$vCode.'" type="application/x-shockwave-flash" allowfullscreen="true" width="'.$width.'" height="'.$height.'"></embed></object>';
with:
return '<object width="'.$width.'" height="'.$height.'"><param name="movie" value="http://www.youtube.com/v/'.$vCode.'&autoplay=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/'.$vCode.'&autoplay=1" type="application/x-shockwave-flash" allowfullscreen="true" width="'.$width.'" height="'.$height.'"></embed></object>';
basically you're adding: &autoplay=1
to the end of where the url populates: "http://www.youtube.com/v/'.$vCode.' HERE "
I did it successfully, but decided it's best to let the user decide to view the content, the file I'm calling is quite large...
Good luck! :)
On line 54 of youtubeembed.php (modules/content/..)
replace:
return '<object width="'.$width.'" height="'.$height.'"><param name="movie" value="http://www.youtube.com/v/'.$vCode.'"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/'.$vCode.'" type="application/x-shockwave-flash" allowfullscreen="true" width="'.$width.'" height="'.$height.'"></embed></object>';
with:
return '<object width="'.$width.'" height="'.$height.'"><param name="movie" value="http://www.youtube.com/v/'.$vCode.'&autoplay=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/'.$vCode.'&autoplay=1" type="application/x-shockwave-flash" allowfullscreen="true" width="'.$width.'" height="'.$height.'"></embed></object>';
basically you're adding: &autoplay=1
to the end of where the url populates: "http://www.youtube.com/v/'.$vCode.' HERE "
I did it successfully, but decided it's best to let the user decide to view the content, the file I'm calling is quite large...
Good luck! :)
noeal sean, Wednesday, 17 March 2010 10:38
same question here....., if anyone has the answer for above question plzzz answer..., iam in need of it..



