Patch #22112

Updated by Toshi MARUYAMA over 1 year 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"> &lt;pre&gt;
$(document).ready(function(){
$(".attachments p:has(a[href$='.mp3'])").after(function () { return "<audio controls><source src=\""+ $(this).find(" a[href$='.mp3'] ").attr("href")+"\" type=\"audio/mpeg\"</audio>" });
});

</code></pre> &lt;/pre&gt;

Back