Greasemonkey script to use HTML5 audio instead of quicktime for VM's

For the voicemail page, was getting frustrated having to use a darn quicktime plugin to play audio in-page. Here you go:

$( document ).ready(function() {

$('#vmail_table tr').each(function() { 
    
    row = $(this);
    
    var link = $(this).find('td:eq(8) a').attr('href');
    var img = $(this).find('td:eq(7) a').first();
   
    img.removeAttr('onclick');
    
    img.click(function() {

        
        //delete any existing rows
        $('.playback_row').remove();
        
        //insert playback row
        row.after('<tr class="playback_row"><td colspan="9"><audio controls id="audio_player"><source src="' + link + '" type="audio/wav"></audio></td></tr>');
        $('#audio_player')[0].play();
    });  
});

});

What file did you edit?

This is (as stated) a grease monkey script. You’d need to install grease monkey on your browser and then load it as a module. It is NOT part of FreePBX nor is/are there any files you’d edit in FreePBX