Sha256: 72eb916bdef51c9d13f8c90d9b19478341d5041fbc4644f5a92e2661e216bf57
Contents?: true
Size: 717 Bytes
Versions: 46
Compression:
Stored size: 717 Bytes
Contents
/** * Obtain the globally shared audio context. There can only be a * limited number of `AudioContext` objects in one page. * * @since 12.1 */ pageflow.audioContext = { /** * @returns [AudioContext] * Returns `null` if web audio API is not supported or creating * the context fails. */ get: function() { var AudioContext = window.AudioContext || window.webkitAudioContext; if (typeof this._audioContext === 'undefined') { try { this._audioContext = AudioContext && new AudioContext(); } catch(e) { this._audioContext = null; pageflow.log('Failed to create AudioContext.', {force: true}); } } return this._audioContext; } };
Version data entries
46 entries across 46 versions & 1 rubygems