EDIT: Just thought it would be worth mentioning, I'm not sure if putting window.AudioContext is important but it seems to have had zero effect.
I am using a visualiser that uses AudioContext to get frequency data. It doesn't work in Internet explorer.
A previous Stack Overflow question was somewhat relevant:
HTML5 How to replace WebAudio API for Internet Explorer for javascript games?
So, I am using the following code to get the AudioContext
function audioContextCheck()
{
if (typeof window.AudioContext !== "undefined") {
console.log('AudioContext');
return new window.AudioContext();
} else if (typeof webkitAudioContext !== "undefined") {
console.log('webkitAudioContext');
return new window.webkitAudioContext();
} else if (typeof window.mozAudioContext !== "undefined") {
console.log('mozAudioContext');
return new window.mozAudioContext();
} else {
console.log('NONE OF THEM!');
}
}
The console returns 'NONE OF THEM', meaning that Internet Explorer (version 11) is unable to load any of the audio thingies.
Microsofts own doccumentation refers to AudioContext(): http://ift.tt/2e5SQtT
I am very confused, am I missing something?
Aucun commentaire:
Enregistrer un commentaire