I have a problem with passing source to audio. I want to do it dynamically so i created state in vuex with path to file and when I pass source manually it work's but when pass source using store.state.currAlarm it shows an error: Cannot find module '../assets/Alarm1.mp3'. Yes I imported store and returned in setup() function.
<audio ref="audio" controls>
<source :src="store.state.currAlarm" type="audio/mpeg">
</audio>
Vuex
state: {
currAlarm: '../assets/Alarm1.mp3'
},
Anyone can help to solve this problem?