Support » Plugins » Resize youTube on the fly?

  • Resolved bcreighton


    Is there a way to resize youtube videos?

    My goal is to detect youtube videos and resize them to a certain width within a template so the post author doesn’t have to worry about it.


Viewing 5 replies - 1 through 5 (of 5 total)
  • Maybe you could use javascript to find all the <objects> and set their width/height (whether they’re from youtube or someplace else). The Prototype library would probably make this job easier.

    The trouble you would run into is this: Lots of folks use plugins that put their youtube videos into posts. I do. I just put a link to a youtube video in a post; the plugin uses javascript to find the link and replace it with <object> tags. You’d run into conflicts if folks used something like that.

    Why not just make the theme wide enough to accommodate the default video size?

    perhaps use or study this plugin

    Hmm, yeah – I guess that would work. I’d have to change the embed width as well. JS isn’t my strong suit, but I’ll try it.

    As far the theme, I’m just the front-end developer. The designer is ok with the user manually changing the width tag when they paste the code in. However, I would like to make that a bit more user friendly and automated.

    adamrbrown – what plugin do you use?

    I think I’ve still got Viper’s Video Quicktags.

    Just remember, your JS will need to execute AFTER any of these plugins fire (so that all the objects/embeds are already created)–i.e. you’ll probably want to execute your JS after the <?php wp_footer(); ?> tag in the template (since that tag is what sets off most of these types of plugins).

    Looks like Viper’s Video Quicktags is exactly what I need. Under options you can set a default width/height for each video format. Definitely customizable – thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Resize youTube on the fly?’ is closed to new replies.