make thumbnail directly from video and use poster for sound files

This commit is contained in:
loicbersier 2019-12-19 15:15:13 +01:00
parent 42fb81a23d
commit 098c569bfa

View file

@ -146,13 +146,11 @@
<p><a class="button is-link is-rounded" href="{{ file.location }}" download>Download<i class="fas fa-fw fa-file-download" aria-hidden="true"></i></a></p> <p><a class="button is-link is-rounded" href="{{ file.location }}" download>Download<i class="fas fa-fw fa-file-download" aria-hidden="true"></i></a></p>
<p><button class="button is-link is-rounded" onclick="toClipboard('https:\/\/namejeff.xyz\/{{ file.location }}')">Add to clipboard<i class="fas fa-fw fa-clipboard" aria-hidden="true"></i></button></p> <p><button class="button is-link is-rounded" onclick="toClipboard('https:\/\/namejeff.xyz\/{{ file.location }}')">Add to clipboard<i class="fas fa-fw fa-clipboard" aria-hidden="true"></i></button></p>
</div> </div>
<figure class="image"> <video muted width="720" height="480" loop onmouseover="this.play()" onmouseout="this.pause();" oncanplay="this.muted=true" poster="{{ file.img }}" preload="metadata">
<video muted width="720" height="480" loop onmouseover="this.play()" onmouseout="this.pause();" oncanplay="this.muted=true"> <source src="{{ file.location }}#t=0.5" >
<source src="{{ file.location }}" type="video/mp4"> <img src="{{ file.img }}" title="Your browser does not support the <video> tag">
<img src="data:image/png;base64, {{ file.img }}">
</video> </video>
<!-- <img src="data:image/png;base64, {{ file.img }}"> --> <!-- <img src="data:image/png;base64, {{ file.img }}"> -->
</figure>
</article> </article>
</div> </div>
@endeach @endeach