fixed image partial
This commit is contained in:
parent
8400ca5110
commit
7d518cf6b5
2 changed files with 1 additions and 16 deletions
|
@ -20,7 +20,6 @@
|
||||||
searchMessage.hidden = true;
|
searchMessage.hidden = true;
|
||||||
assetHolder.hidden = false;
|
assetHolder.hidden = false;
|
||||||
asset.setAttribute('src', `/{{claimInfo.claimId}}/{{claimInfo.name}}.{{claimInfo.fileExt}}`);
|
asset.setAttribute('src', `/{{claimInfo.claimId}}/{{claimInfo.name}}.{{claimInfo.fileExt}}`);
|
||||||
asset.load();
|
|
||||||
},
|
},
|
||||||
showSearchMessage: function (msg) {
|
showSearchMessage: function (msg) {
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
|
|
|
@ -1,15 +1 @@
|
||||||
<video id="video-player" controls poster="{{claimInfo.thumbnail}}">
|
<img id="asset" class="asset" />
|
||||||
<source id="asset">
|
|
||||||
<!--fallback-->
|
|
||||||
Your browser does not support the <code>video</code> element.
|
|
||||||
</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