mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
chrome.desktopCapture and chrome.tabCapture
This commit is contained in:
committed by
Ihor Kostiuk
parent
502b579f77
commit
ae0cf5e7d2
Vendored
+31
@@ -3,6 +3,8 @@
|
||||
// Definitions by: Matthew Kimber <https://github.com/matthewkimber>, otiai10 <https://github.com/otiai10>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path='../webrtc/MediaStream.d.ts'/>
|
||||
|
||||
////////////////////
|
||||
// Alarms
|
||||
////////////////////
|
||||
@@ -537,6 +539,14 @@ declare module chrome.declarativeWebRequest {
|
||||
var onRequest: RequestedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// DesktopCapture
|
||||
////////////////////
|
||||
declare module chrome.desktopCapture {
|
||||
export function chooseDesktopMedia(sources: string[], targetTab?: chrome.tabs.Tab, callback?: (streamId: string) => void): void;
|
||||
export function cancelChooseDesktopMedia(desktopMediaRequestId: number): void;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// Dev Tools - Inspected Window
|
||||
////////////////////
|
||||
@@ -1745,6 +1755,27 @@ declare module chrome.socket {
|
||||
export function getNetworkList(callback: (result: NetworkInterface[]) => void): void;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// TabCapture
|
||||
////////////////////
|
||||
declare module chrome.tabCapture {
|
||||
interface CaptureInfo {
|
||||
tabId: number;
|
||||
status: string;
|
||||
fullscreen: boolean;
|
||||
}
|
||||
|
||||
interface CaptureOptions {
|
||||
audio?: boolean;
|
||||
video?: boolean;
|
||||
audioConstraints?: MediaTrackConstraints;
|
||||
videoConstraints?: MediaTrackConstraints;
|
||||
}
|
||||
|
||||
export function capture(options: CaptureOptions, callback: (stream: LocalMediaStream) => void): void;
|
||||
export function getCapturedTabs(callback: (result: CaptureInfo[]) => void): void;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// Tabs
|
||||
////////////////////
|
||||
|
||||
Reference in New Issue
Block a user