JSFiddle - React, Tailwind, and code Playground

HTML

<iframe src="//www.youtube.com/embed/VVKVvoe2P2A?showinfo=0&amp;wmode=transparent" frameborder="0" allowfullscreen="allowfullscreen" width="853" height="480"></iframe>

JavaScript

$(document).ready(function() {
	var $allVideos = $('iframe[src*="player.vimeo.com"], iframe[src*="youtube.com"], iframe[src*="youtube-nocookie.com"], iframe[src*="kickstarter.com"][src*="video.html"], object, embed');

	$allVideos.each(function() {
		$(this).attr('data-aspectRatio', this.height / this.width).attr('style', 'max-width:'+this.width+'px; max-height:'+this.height+'px;').attr('width', '100%');
	});

	$(window).resize(function() {
		$allVideos.each(function() {
			$(this).attr('height', $(this).width() * $(this).attr('data-aspectRatio'));
		});
	}).resize();
});