-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from danielrbradley/typings
Add TypeScript support
- Loading branch information
Showing
3 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
interface Device { | ||
deviceId: string; | ||
groupId: string; | ||
id: string; | ||
isCustomLabel?: boolean; | ||
kind: string; | ||
label: string; | ||
} | ||
|
||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters