Project

General

Profile

Patch #22112

Updated by Toshi MARUYAMA over 8 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"> <pre> 
 $(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> </pre>

Back