Skip to content
Advertisement

AudioContext Web audio API not working in IE(11)

I am building a website, in which there is a feature to play audio in one earbud rather than in both earbuds on every page reload, all of the code is working fine in Google Chrome, Firefox, Microsoft Edge, but not working in IE(11). I have been stuck in solving this bug but it’s always showing the following error

SCRIPT445: Object doesn’t support this action

line error is in the following code

var audioCtx = new (window.AudioContext || window.webkitAudioContext);

I have checked this code in the try-catch case but also it didn’t execute. Can anybody help out me to remove this error or can provide me any alternative script instead if WEB AUDIO API AudioContext

Advertisement

Answer

My understanding is that IE has never supported WebAudio and never will. All you can do is detect if window.AudioContext exists and give up with perhaps some notification about not working on IE.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement