Hello guys....
Here I have a piece of code that goes like this:
The problem is that if someone decides to embed a clip of a large ratio from you tube - it will appear large - I've been trying to change the width in this code but it looks like it's always overlayed by the embedded clip sizes. I want every clip on my page to have width="300" height="169" - how can I do this ? The next frustrating issue is ( after 100 tries ) the clips don't autostart / autoplay at all...I've tried to use autostart=1 or a=1...I'd be grateful for any comments..Regards.
Here I have a piece of code that goes like this:
Code:
<?php
function embedVideo($url){
if(preg_match("#[URL unfurl="true"]http://(.*)\.youtube\.com/watch\?v=(.*)(&(.*))?#",[/URL] $url, $matches)){
?>
<object width="300" height="169">
<param name="movie" value="[URL unfurl="true"]http://www.youtube.com/v/<?php[/URL] echo $matches[2];?>&hl=en&fs=1"></param>
<param name="allowFullScreen" value="false"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="[URL unfurl="true"]http://www.youtube.com/v/<?php[/URL] echo $matches[2];?>&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="false" width="300" height="169" autostart="1"></embed>
</object>
<?php
}elseif(preg_match("#[URL unfurl="true"]http://www\.metacafe\.com/watch/(([/URL][^/].*)/([^/].*))/?#", $url, $matches)){
?>
<embed flashVars="playerVars=showStats=no|autoPlay=yes|videoTitle=" src="[URL unfurl="true"]http://www.metacafe.com/fplayer/<?php[/URL] echo $matches[1];?>.swf" width="300" height="169" wmode="transparent" pluginspage="[URL unfurl="true"]http://www.macromedia.com/go/getflashplayer"[/URL] type="application/x-shockwave-flash"> </embed>
<?php
}
}
$youtubeVideo1 = $speakShow;
embedVideo($youtubeVideo1);
$metacafeVideo1=$speakShow;
embedVideo($metacafeVideo1);
?>
The problem is that if someone decides to embed a clip of a large ratio from you tube - it will appear large - I've been trying to change the width in this code but it looks like it's always overlayed by the embedded clip sizes. I want every clip on my page to have width="300" height="169" - how can I do this ? The next frustrating issue is ( after 100 tries ) the clips don't autostart / autoplay at all...I've tried to use autostart=1 or a=1...I'd be grateful for any comments..Regards.