Development #287
1 changed files with 2 additions and 11 deletions
|
@ -1,15 +1,6 @@
|
||||||
|
|
||||||
<video id="video-asset" class="asset" controls poster="{{claimInfo.thumbnail}}">
|
<video id="video-asset" class="asset" controls poster="{{claimInfo.thumbnail}}">
|
||||||
<source>
|
<source>
|
||||||
<!--fallback-->
|
<!--fallback-->
|
||||||
Your browser does not support the <code>video</code> element.
|
Your browser does not support the <code>video</code> element.
|
||||||
</video>
|
</video>
|
||||||
<!--dynamically resize video player-->
|
|
||||||
<script type="text/javascript">
|
|
||||||
document.addEventListener('DOMContentLoaded', resizeVideoPlayer)
|
|
||||||
window.addEventListener("resize", resizeVideoPlayer);
|
|
||||||
function resizeVideoPlayer() {
|
|
||||||
const div = document.getElementById('video-player');
|
|
||||||
const width = div.offsetWidth;
|
|
||||||
div.height = (width * 9 / 16);
|
|
||||||
}
|
|
||||||
</script>
|
|
Loading…
Reference in a new issue