loadDecodedBuffer in version 7 #3201
-
hello all I already checked the #2806 while using > wavesurfer.load(url, peaks, duration); I am getting this error (Uncaught (in promise) DOMException: The element has no supported sources.) at Is there any alternative way for using loadDecodedBuffer as because of using blob don't no why Iphone increase the total resources size, single audio file becomes two for the browser using blog and you guys are planning for adding loadDecodedBuffer method in the version 7 ? thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
You could try const blob = new Blob([audioBuffer], { type: 'audio/wav' })
const peaks = [ audioBuffer.getChannelData(0), audioBuffer.getChannelData(1) ]
const duration = audioBuffer.duration
wavesurfer.loadBlob(blob, peaks, duration); |
Beta Was this translation helpful? Give feedback.
-
hello @katspaugh, and what happens if you want to provide an ArrayBuffer representing the wav as it was done in v6 like this const audioContext = new (window.AudioContext)(); In the example use case i have an audio encrypted, and I decrypt it into an ArrayBuffer and then provide it to wavesurfer component as stated, being opaque for the console and network the decrypted audio By dropping this loadDecodedBuffer and force the blob way, you lose this use case, not clear why. On the use case exposed to access the decrypted audio you need to go against the memory directly, it is several points harder than exposing it thorugh a blob or a URL. |
Beta Was this translation helpful? Give feedback.
No plans to bring back
loadDecodedBuffer
as we're not using a Web Audio buffer for playback anymore.