@twilio/rtc-diagnostics
Version:
Various diagnostics functions to help analyze connections to Twilio
27 lines (26 loc) • 808 B
TypeScript
import { UnsupportedError } from '../errors';
/**
* This file provides a cross-browser polyfill for AudioContext.
*
* Currently, Safari is the only browser that needs this as it still prefixes
* `AudioContext` as `webkitAudioContext`.
*
* It is necessary to declare `AudioContext` in the `Window` global as it does
* not exist in older typings.
*/
declare global {
interface Window {
AudioContext: typeof AudioContext;
webkitAudioContext: typeof AudioContext;
}
}
/**
* @internalapi
* Common error that can be thrown when the polyfill is unable to work.
*/
export declare const AudioContextUnsupportedError: UnsupportedError;
/**
* @internalapi
* Attempts to polyfill `AudioContext`.
*/
export declare const AudioContextPolyfill: typeof window.AudioContext | undefined;