portfoligor/layouts/shortcodes/audio.html

16 lines
716 B
HTML

<figure class="audio">
<figcaption><p>{{ .Get "legend" }}</p></figcaption>
<audio controls preload="metadata">
<source src="/medias/{{ .Get "src" }}.opus" type="audio/opus" codecs="opus">
<source src="/medias/{{ .Get "src" }}.ogg" type="audio/ogg" codecs="vorbis">
<source src="/medias/{{ .Get "src" }}.mp3" type="audio/mpeg">
Your browser does not support the audio tag, you can download the audio
with <a href="/medias/{{ .Get "src" }}.mp3">this link</a>
</audio>
<p>
<a href="/medias/{{ .Get "src" }}.opus">opus</a> /
<a href="/medias/{{ .Get "src" }}.ogg">ogg</a> /
<a href="/medias/{{ .Get "src" }}.mp3">mp3</a>
</p>
</figure>