kopia lustrzana https://github.com/m1el/woscope
woscope returns context object
rodzic
f80777c14e
commit
5573461476
6
index.js
6
index.js
|
@ -81,18 +81,18 @@ function woscope(config) {
|
|||
progressLoop();
|
||||
|
||||
axhr(audioUrl, function(buffer) {
|
||||
callback();
|
||||
|
||||
ctx.audioData = prepareAudioData(ctx, buffer);
|
||||
ctx.loaded = true;
|
||||
callback(ctx);
|
||||
loop();
|
||||
|
||||
},
|
||||
config.error,
|
||||
function (e) {
|
||||
ctx.progress = e.total ? e.loaded / e.total : 1.0;
|
||||
console.log('progress: ' + e.loaded + ' / ' + e.total);
|
||||
});
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
||||
function initAudioCtx(errorCallback) {
|
||||
|
|
Ładowanie…
Reference in New Issue