Open kennystrawnmusic opened 9 years ago
This is related to MobileChromeApps/mobile-chrome-apps/issues/184 I think.
In the mean time, as a workaround, you can play local files programmatically by loading them with XHR and using an audioContext:
var audioCtx = new window.AudioContext;
function play(url) {
var request = new XMLHttpRequest();
request.open('GET', url, true);
request.responseType = 'arraybuffer';
request.onload = function() {
audioCtx.decodeAudioData(request.response, function(buffer) {
var source = audioCtx.createBufferSource();
source.buffer = buffer;
source.connect(audioCtx.destination);
source.start(0);
}, function(e) {
console.log('Error decoding audio', e);
});
}
request.send();
}
(Note: do make sure not to create a new audioContext each time, as there is a firm limit on how many can be open)
What is the status of this? Will it be fixed in the foreseeable future, or should we rely on the workaround?
As per @Swader's report in the CDE bug tracker,