chrome.desktopCapture and chrome.tabCapture

This commit is contained in:
Ihor Kostiuk
2014-08-20 17:51:46 +03:00
committed by Ihor Kostiuk
parent 502b579f77
commit ae0cf5e7d2
+31
View File
@@ -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
////////////////////