Buzz is a small but powerful Javascript library that allows you to easily take advantage of the new HTML5 audio element. It tries to degrade silently on non-modern browsers.
We ran into the following error when many tabs are opened:
Uncaught SyntaxError: Failed to construct 'AudioContext': number of hardware contexts reached maximum (6).
This is caused by the AudioContext always being created, although "webAudioApi" is not enabled.
This PR lazily creates the context. In addition it also catches any errors, so it falls back to the usual way of playing if the limit has been reached.
We ran into the following error when many tabs are opened:
Uncaught SyntaxError: Failed to construct 'AudioContext': number of hardware contexts reached maximum (6).
This is caused by the AudioContext always being created, although "webAudioApi" is not enabled.
This PR lazily creates the context. In addition it also catches any errors, so it falls back to the usual way of playing if the limit has been reached.