I am facing an issue with embedding YouTube videos on my webpage. I have tried to make the videos responsive by using the code provided below, which works well on mobile and tablets. However, on desktops and laptops, the videos appear very large. As a workaround, I attempted to use the HTML5 video tag with width: 100% and height auto to address the responsiveness issue, but I encountered problems with video loading and buffering. Subsequently, I reverted back to using the YouTube embed option for better video loading performance, albeit sacrificing some responsiveness on laptops and desktops. You can view the webpage where the videos are embedded through the attached link.
Code-
<div class="container">
<div class="ratio ratio-16x9">
<iframe src="https://www.youtube.com/embed/kq7CdSf7ocA?rel=0" title="YouTube video
player" frameborder="0" allow="accelerometer; autoplay; clipboard-write;
encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>