-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33e2e0f
commit 257fafa
Showing
5 changed files
with
101 additions
and
1 deletion.
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
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,23 @@ | ||
|
||
// Region Capture | ||
// Specification: https://w3c.github.io/mediacapture-region/ | ||
// Repository: https://github.com/w3c/mediacapture-region | ||
|
||
interface CropTarget { } | ||
|
||
declare var CropTarget: { | ||
prototype: CropTarget; | ||
fromElement(element: Element): Promise<CropTarget>; | ||
}; | ||
|
||
interface BrowserCaptureMediaStreamTrack { | ||
cropTo(cropTarget?: CropTarget): Promise<void>; | ||
clone(): BrowserCaptureMediaStreamTrack; | ||
} | ||
|
||
declare var BrowserCaptureMediaStreamTrack: { | ||
prototype: BrowserCaptureMediaStreamTrack; | ||
}; | ||
|
||
// intentionally the wrong way round since per lib.dom.d.ts, MediaStream.prototype.getVideoTracks() always returns returns MediaStreamTrack[] | ||
interface MediaStreamTrack extends BrowserCaptureMediaStreamTrack { } |
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,73 @@ | ||
|
||
// Screen Capture | ||
// Specification: https://w3c.github.io/mediacapture-screen-share/ | ||
// Repository: https://github.com/w3c/mediacapture-screen-share | ||
|
||
interface DisplayMediaStreamOptions { | ||
controller?: CaptureController; | ||
selfBrowserSurface?: SelfCapturePreferenceEnum; | ||
systemAudio?: SystemAudioPreferenceEnum; | ||
surfaceSwitching?: SurfaceSwitchingPreferenceEnum; | ||
monitorTypeSurfaces?: MonitorTypeSurfacesEnum; | ||
} | ||
|
||
interface MediaTrackSupportedConstraints { | ||
logicalSurface?: boolean; | ||
cursor?: boolean; | ||
restrictOwnAudio?: boolean; | ||
suppressLocalAudioPlayback?: boolean; | ||
} | ||
|
||
interface MediaTrackConstraintSet { | ||
logicalSurface?: ConstrainBoolean; | ||
cursor?: ConstrainDOMString; | ||
restrictOwnAudio?: ConstrainBoolean; | ||
suppressLocalAudioPlayback?: ConstrainBoolean; | ||
} | ||
|
||
interface MediaTrackSettings { | ||
logicalSurface?: boolean; | ||
cursor?: boolean; | ||
restrictOwnAudio?: boolean; | ||
suppressLocalAudioPlayback?: boolean; | ||
} | ||
|
||
interface MediaTrackCapabilities { | ||
logicalSurface?: boolean; | ||
cursor?: string[], | ||
} | ||
|
||
interface CaptureController { | ||
setFocusBehavior(focusBehavior: CaptureStartFocusBehavior): void; | ||
} | ||
|
||
type CaptureStartFocusBehavior = ( | ||
| "focus-capturing-application" | ||
| "focus-captured-surface" | ||
| "no-focus-change" | ||
); | ||
|
||
declare var CaptureController: { | ||
prototype: CaptureController; | ||
new(): CaptureController; | ||
} | ||
|
||
type SelfCapturePreferenceEnum = ( | ||
| "include" | ||
| "exclude" | ||
); | ||
|
||
type SystemAudioPreferenceEnum = ( | ||
| "include" | ||
| "exclude" | ||
); | ||
|
||
type SurfaceSwitchingPreferenceEnum = ( | ||
| "include" | ||
| "exclude" | ||
); | ||
|
||
type MonitorTypeSurfacesEnum = ( | ||
| "include" | ||
| "exclude" | ||
); |