@phenixrts/sdk
Version:
JavaScript SDK
36 lines (35 loc) • 1.58 kB
TypeScript
declare global {
interface Window {
__phenixPageLoadTime?: number;
__pageLoadTime?: number;
}
interface RTCPeerConnectionEventMap {
addstream: {
stream: MediaStream;
};
}
}
interface IWindow {
readonly FormData: typeof FormData;
readonly HTMLVideoElement: typeof HTMLVideoElement;
readonly MediaStream: typeof MediaStream;
readonly MediaStreamTrack: typeof MediaStreamTrack;
readonly MediaSource: typeof MediaSource;
readonly RTCPeerConnection: typeof RTCPeerConnection;
readonly RTCSessionDescription: typeof RTCSessionDescription;
readonly RTCIceCandidate: typeof RTCIceCandidate;
readonly URL: typeof URL;
readonly URLSearchParams: typeof URLSearchParams;
readonly __phenixPageLoadTime?: number;
readonly __pageLoadTime?: number;
readonly addEventListener: (type: string, listener: (event: Event) => void) => void;
readonly clearTimeout: (id?: number | undefined) => void;
readonly clearInterval: (id?: number | undefined) => void;
readonly fetch: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
readonly queueMicrotask: (microTask: () => void) => void;
readonly removeEventListener: (type: string, listener: (event: Event) => void) => void;
readonly requestAnimationFrame: (callback: FrameRequestCallback) => number;
readonly setInterval: (handler: string | Function, timeout?: number) => number;
readonly setTimeout: (handler: string | Function, timeout?: number) => number;
}
export default IWindow;