Edit in JSFiddle

if($('iframe').length){
  $('iframe').each(function(){
    $(this).parent('p').addClass('iframewrap');
  });
}
<p>
  <iframe width="560" height="315" src="https://www.youtube.com/embed/ll65PEENASA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</p>
.iframewrap{
  position: relative;
  overflow: hidden;
  padding-top: 56.25%;
}
.iframewrap iframe{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}