Quote:
Originally Posted by Wayne Luke
Sorry if this has been posted before but there are too many posts in the thread to read them all.
I want to show YouTube HD in a 16:9 format and not the 4:3 format provided now. Anyone know how to change the definition to accommodate this?
|
Depends on a couple things. I moved the position of one of AMEs hooks in 2.5.5 to hopefully accommodate what I think you're after.
If only using the default youtube definition and you only want youtube videos with hd=1 in the URL to be a larger size, then just create a new plugin:
Hook Location: automediaembed_parse_bbcode_match_start
Title: Youtube HD Bigga Please
Code:
PHP Code:
if ($ameinfo['key'] == "youtube" && $ameinfo['zone'] == "post")
{
if (strpos($ameinfo['url'], "hd=1"))
{
$ameinfo['width'] = "640";
$ameinfo['height'] = "480";
}
}
Obviously adjust width and height as you fancy.
What this will do is check the definition key and the zone you are in. If the matching definition key is youtube and the zone is post, then it will check the URL for hd=1 (which is my understanding of how youtube marks HD URLs. It then overrides the zones size.
I am sure you can get even more creative
Anyhoo, hope this helps!