WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How does YouTube embed work? (2 posts)

  1. kgagne
    Member
    Posted 2 years ago #

    Hello,

    When I place a YouTube video's URL into a blog post, it automatically converts to the embed code. Neat feature! It even knows to span the width of my post column. But how does WordPress determine the height of the embedded video? Since not all YouTube videos are of identical proportions, it seems like WordPress would need to know the dimensions of the original video. How does it get that info?

    I don't know much PHP but tried poking around in the WordPress code. All I found was a default size of 425 x 350, which isn't true in all cases.

    -Ken

  2. kgagne
    Member
    Posted 2 years ago #

    Ah! It's likely via oEmbed.

    http://oembed.com/#section5.1

Topic Closed

This topic has been closed to new replies.

About this Topic