You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
| 1234567891011121314 |
- /**
- * Adapter that creates AudioContext objects depending on the browser.
- *
- * @returns {AudioContext | undefined} - Return a new AudioContext or undefined if the browser does not support it.
- */
- export function createAudioContext(options?: AudioContextOptions): AudioContext | undefined {
- const AudioContextImpl = window.AudioContext || (window as any).webkitAudioContext;
-
- if (!AudioContextImpl) {
- return undefined;
- }
-
- return new AudioContextImpl(options);
- }
|