wavesurfer.js tries to send a http request while calling loadBlob #3508
Answered
by
katspaugh
UchihaYuki
asked this question in
Q&A
-
I use angular framework this.waveSurfer = WaveSurfer.create({
container: this.waveform,
waveColor: '#ff00ff',
progressColor: '#000000',
});
this.audioFile.onchange = (event: any) => {
const file = event.target.files[0];
const reader = new FileReader();
reader.onload = (event) => {
const arrayBuffer = event.target.result;
const blob = new Blob([arrayBuffer]);
console.log(blob);
this.waveSurfer.loadBlob(blob).then(() => {});
};
reader.onerror = (event) => {
console.error('An error ocurred while reading the file: ', event);
};
reader.readAsArrayBuffer(file);
}; when the following line is called this.waveSurfer.loadBlob(blob).then(() => {}); I saw the following in console
|
Beta Was this translation helpful? Give feedback.
Answered by
katspaugh
Jan 24, 2024
Replies: 1 comment 2 replies
-
If it’s fetching that, then that’s what you’re passing to the loadBlob function… |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please make sure your blob has a correct content type, e.g. audio/mpeg