Current approach is just download the mp3 file from backend side (Laravel 8/BinaryFileResponse).
My JS code :
axios.post(baseUrl + '/api/audio', payload, {
headers: {
'Content-Type': 'application/json',
}
}).then(response => {
theTrack = response.data.value;
const blob = new Blob([theTrack], {type: "audio/mpeg"});
let urlCreator = window.URL || window.webkitURL;
audio[0].src = urlCreator.createObjectURL(blob);
audio[0].load();
audio[0].play();
});
Chromium console has :
Uncaught (in promise) DOMException: Failed to load because no supported source was found.
Binary should be fine since I can play it from the Network panel.