Skip to content

Commit

Permalink
spectrogram plugin: fix offline audio context definition for Safari (k…
Browse files Browse the repository at this point in the history
  • Loading branch information
akreal committed Jan 17, 2016
1 parent 664ac78 commit b3afa1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/wavesurfer.spectrogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ WaveSurfer.Spectrogram = {
}

var frequencies = [];
var context = new window.OfflineAudioContext(1, buffer.length, buffer.sampleRate);
var context = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, buffer.length, buffer.sampleRate);
var source = context.createBufferSource();
var processor = context.createScriptProcessor(0, 1, 1);

Expand Down

0 comments on commit b3afa1f

Please sign in to comment.