1
votes

So I recently posted this question: CLICK HERE

And I have come to the conclusion, that I just don't have the time to make this work for Firefox. It would be nice, but I have other projects that I need to work on. So I have decided to just perform a simple functionality check on this, so that it will still play in Firefox, but not attempt to load the visualizer, which is causing the entire player to seize up and not play at all.

But I'm not sure at all with functionality to check for? The Web API works when it's just the Web API, and the Custom Controls work, when it's just the Custom Controls, so what exactly would I check for, so that

if(functionality not supported){
    //Don't load Visualizer at all();
}

My Original jFiddle is here: http://jsfiddle.net/murphy1976/yqqf7uL1/1/

1

1 Answers

2
votes

Well, you're trying to work around a bug here. So if you want real feature detection, you'd need to write a function that tries to do what you want and see if it works or not. Because you're dealing with CORS stuff and making requests, that means it'll be an asynchronous test - which might be tough depending on how your app is set up.

Another option, which would be sub-optimal but also very easy, is to just do something like /firefox/i.test( navigator.userAgent ).