ejci / Chrome-Audio-EQ

Audio EQ for Chrome
GNU General Public License v2.0
106 stars 40 forks source link

AudioContext constructor issue #11

Closed ghost closed 8 years ago

ghost commented 10 years ago

Found following error in dev tools console:

Uncaught SyntaxError: Failed to construct 'AudioContext': number of hardware contexts reached maximum

I think, caching of audio context instance should prevent the instance limit issue.

File: https://github.com/ejci/Chrome-Audio-EQ/blob/master/extension/page/page.js#L18 Line: 18

this.AudioContext = new webkitAudioContext();
ejci commented 10 years ago

The main issue is that eq.attach() method is called too many times. The ObserveDOM method needs to be rewritten so EQ will be not attached to the element if it was already attached. The mutation observer callback is fired always when there is a change on audio/video element. I have it in my TODO list :)

And thanks for the fix! I will release your fix after I fix ObserveDOM method.

Berzeger commented 10 years ago

When is it going to be released? As of now I have to uninstall the extension, because I can't play any YouTube videos - keep getting this error every time.

ghost commented 10 years ago

@Berzeger, you can rebuild the extension from the source. Currently, there is no ready-to-use extension. The fix of the bug should be applied by @ejci.

ejci commented 10 years ago

Im on it... I need to refactor the code. I will release an update this weekend

Berzeger commented 10 years ago

Thank you, much appreciated!