I'm looking for a CSS way to embed a responsive video (iframe) so that its height is always 100% of the window and width adapts to whatever the ratio allows. All I can find on the matter is about the opposite (variations of this technique).
So ideally it would be like
.videoContainer {
height: 100%;
width: auto;
max-width: 90%; // Bonus : I need the video not to be 100% width
display: inline-block;
position: relative;
}
.videoContainer::after {
padding-top: 56.25%;
display: block;
content: '';
}
.videoContainer>iframe{
width:100%;
height:100%;
position:absolute;
top:0;
left:0;
}
I'm not sure it's even possible. No JS preferably.