Patch #22112

Updated by Toshi MARUYAMA almost 2 years ago

I added a simple line on bottom of application.js to create a HTML5 control if the attachment is an mp3.

i share it with you.

<pre><code class="js">
$(document).ready(function(){

$(".attachments p:has(a[href$='.mp3'])").after(function () {
return "<audio controls><source src=\"" +
src=\&quot;&quot;+ $(this).find(" a[href$='.mp3'] ").attr("href")+"\" type=\"audio/mpeg\"</audio>"
});
});


</code></pre>

Back