vue-audio-visual
vue-audio-visual copied to clipboard
AVBars Component's audio address, unable to use local audio files dynamically
<AVBars
v-if='myAudio'
ref="player"
:src="myAudio"
caps-color="#FFF"
:bar-color="['#f00', '#ff0', '#0f0']"
canv-fill-color="#000"
:brick-height="6"
:bar-width="10"
:caps-height="2"
></AVBars>
Here is my way to dynamically obtain audio files:
const uint8Buffer = Uint8Array.from(value); const wav = new Blob([uint8Buffer]); myAudio = window.URL.createObjectURL(wav);
If you are trying to load local file from the disk then there is something with the way you do it. I do not think it has anything to do with the plugin. It is designed to work with URLs.
Anything that works with <audio/>
standard HTML element should work with the plugin.