<script>
	$(document).ready(
		function() {
			var player = $('#{{ id }}');
			var width = player.width();
			var height = player.height();
			var ratio = width / height;
			
			$(window).resize(
				function() {
					$('#{{ id }}').css(
						{
							'height': $('#{{ id }}').width() / ratio
						}
					);
				}
			);
		}
	);
</script>