Commit 74ad37a6 authored by fred's avatar fred
Browse files

fix getting waveform for mp3 soundfiles

parent 5111e2c7
......@@ -470,7 +470,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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment