Upon initialization of Jwplayer, a class is injected with the following CSS:
.jwplayer.jw-flag-aspect-mode {
height: auto !important;
}
Here's my code snippet:
<div style="height: 80vh; width: 100%">
<div style="height: 90%; width: 100%;>
<div style="height: 100%; width: 100%;>
<!-- JwPlayer here -->
<div id="sample-video"></div>
</div>
</div>
<div style="height: 10%; width: 100%;>
<!-- actions bar here -->
</div>
</div>
<script type="text/javascript">
//psuedo code
jwplayer('#sample-video").setup({
sources: sources,
autostart:true,
width: '100%'
});
</script>
The issue arises when Jwplayer injects its own CSS, overriding manually set heights, even when using inline styles or their setup method with the specified class.
https://i.sstatic.net/W785X.jpg
This causes the video player to overflow below the parent container. Changing height: auto to height: 100%; would correct this behavior as expected.
I've explored various solutions provided here and on Jwplayer's support site without success.