forked from muaz-khan/DetectRTC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DetectRTC.d.ts
77 lines (65 loc) · 2.64 KB
/
DetectRTC.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
interface Device {
deviceId: string;
groupId: string;
id: string;
isCustomLabel?: boolean;
kind: string;
label: string;
}
declare namespace DetectRTC {
export function load(callback: () => void): void;
export const version: string;
export const osName: string;
export const osVersion: string;
export const hasWebcam: boolean;
export const hasMicrophone: boolean; // (has microphone device!)
export const hasSpeakers: boolean; // (has speakers!)
export const isApplyConstraintsSupported: boolean;
export const isAudioContextSupported: boolean;
export const isCanvasSupportsStreamCapturing: boolean;
export const isCreateMediaStreamSourceSupported: boolean;
export const isGetUserMediaSupported: boolean;
export const isMobileDevice: boolean;
export const isMultiMonitorScreenCapturingSupported: boolean;
export const isORTCSupported: boolean;
export const isPromisesSupported: boolean;
export const isRTPSenderReplaceTracksSupported: boolean;
export const isRemoteStreamProcessingSupported: boolean;
export const isRtpDataChannelsSupported: boolean;
export const isScreenCapturingSupported: boolean; // Chrome, Firefox, Opera, Edge and Android
export const isSctpDataChannelsSupported: boolean;
export const isSetSinkIdSupported: boolean;
export const isVideoSupportsStreamCapturing: boolean;
export const isWebRTCSupported: boolean;
export const isWebSocketsBlocked: boolean;
export const isWebSocketsSupported: boolean;
export const isWebsiteHasMicrophonePermissions: boolean; // getUserMedia allowed for HTTPs domain in Chrome?
export const isWebsiteHasWebcamPermissions: boolean; // getUserMedia allowed for HTTPs domain in Chrome?
export const isDesktopCapturingSupported: boolean;
export function checkWebSocketsSupport(callback: () => void);
export const audioInputDevices: Device[]; // microphones
export const audioOutputDevices: Device[]; // speakers
export const videoInputDevices: Device[]; // cameras
export const displayAspectRatio: string;
export const displayResolution: string;
export const browser: {
name: "Edge" | "Chrome" | "Firefox" | string;
version: string | number;
fullVersion: string;
isChrome?: boolean;
isFirefox?: boolean;
isOpera?: boolean;
isIE?: boolean;
isSafari?: boolean;
isEdge?: boolean;
isPrivateBrowsing?: boolean; // incognito or private modes
};
export function DetectLocalIPAddress(
callback: (localIpAddress: string) => void
);
export const MediaDevices: Device[];
export const MediaStream: string[];
export const MediaStreamTrack: string[];
export const RTCPeerConnection: string[];
}
export = DetectRTC;