The code will look for the parent of the iframe and will calculate the width of this parent and adjust the aspect ratio of the iframe. The parent could be the BODY of the document or any other element as DIV or ARTICLE or SECTION. You choose.

Usage:

Use with any independent object like:<iframe src="your.youtube.url/id" onload="adjustVideoRatioToParent({e:this,r:'std'});"></iframe>

Or just enter it in you jQuery(document).ready() function if all the videos in the screen will have the same aspect ratio.