Determining the Width and Height of a YouTube video embedded with an Object tag


  • I am embedding several YouTube videos in my ASP.NET pages using html similar to the following:

    <object type="application/x-shockwave-flash" width="" height="" data="">
     <param name="movie" value=""/>

    I have values for the data and value attributes, and it works when I put values in for the width and height attributes, but I am not sure what the width and height attributes should be. First of all, is there a way for me to get them (or at least the ratio) from YouTube? Second, what should I do as far as adjusting the values for the controls? I am new to displaying videos on my page, so any help would be appreciated. Thanks.

    Nathan Sokalski

    Wednesday, November 06, 2013 11:20 PM