]> git.0d.be Git - panikweb-esperanzah.git/blobdiff - panikweb_esperanzah/static/js/specifics.js
fix getting waveform for mp3 soundfiles
[panikweb-esperanzah.git] / panikweb_esperanzah / static / js / specifics.js
index 3f74e0761ace56826fe983a480abfead84e34cf0..5f9a6efaf103c2b9c3f0000d8cc69e70d01b5a00 100644 (file)
@@ -443,7 +443,8 @@ $(function() {
                        var audio_src = $(audio).find('source')[0];
                        var sound_id = $(audio).data('sound-id');
                        var $waveform = $(audio).next();
-                       $.getJSON(audio_src.src.replace('.ogg', '.waveform.json'), function(data) {
+                       var waveform_url = audio_src.src.replace('.ogg', '.waveform.json').replace('.mp3', '.waveform.json');
+                       $.getJSON(waveform_url, function(data) {
                                $waveform.empty();
                                $waveform.append('<i class="duration">' + $waveform.data('duration-string') + '</i>');
                                $.each(data, function(k, val) {