I have a string that is audio encoded in base64 and in wav format (I have adata link - {{vm.record}}).
I need to add an audio player in a widget which is written in js + html.
I don't understand why this didn't work. Do I need to write something in js to make this work? Where I can specify encoding ?
<audio
controls
src={{vm.record}} type="audio/wav; base64" autobuffer="autobuffer" autoplay="autoplay">
Your browser does not support the <code>audio</code> element.
</audio>
I know that "type="audio/wav; base64" is wrong.
I also tried this, but it didn't work:
<audio controls src="data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAfm5nB6slBlZ3Fcha363d5ut7u3ni1rLoPf728l3KcK"/>
audio/ogg
byaudio/wave
. The first code sample might be wrong because the data format prefix is missing there, but it's hard to tell without seeing the exact content behind{{vm.record}}
.{{vm.record}}
= TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCAuLi4=