|
| 1 | + |
| 2 | +// Screen Capture |
| 3 | +// Specification: https://w3c.github.io/mediacapture-screen-share/ |
| 4 | +// Repository: https://github.com/w3c/mediacapture-screen-share |
| 5 | + |
| 6 | +interface DisplayMediaStreamOptions { |
| 7 | + controller?: CaptureController; |
| 8 | + selfBrowserSurface?: SelfCapturePreferenceEnum; |
| 9 | + systemAudio?: SystemAudioPreferenceEnum; |
| 10 | + surfaceSwitching?: SurfaceSwitchingPreferenceEnum; |
| 11 | + monitorTypeSurfaces?: MonitorTypeSurfacesEnum; |
| 12 | +} |
| 13 | + |
| 14 | +interface MediaTrackSupportedConstraints { |
| 15 | + logicalSurface?: boolean; |
| 16 | + cursor?: boolean; |
| 17 | + restrictOwnAudio?: boolean; |
| 18 | + suppressLocalAudioPlayback?: boolean; |
| 19 | +} |
| 20 | + |
| 21 | +interface MediaTrackConstraintSet { |
| 22 | + logicalSurface?: ConstrainBoolean; |
| 23 | + cursor?: ConstrainDOMString; |
| 24 | + restrictOwnAudio?: ConstrainBoolean; |
| 25 | + suppressLocalAudioPlayback?: ConstrainBoolean; |
| 26 | +} |
| 27 | + |
| 28 | +interface MediaTrackSettings { |
| 29 | + logicalSurface?: boolean; |
| 30 | + cursor?: boolean; |
| 31 | + restrictOwnAudio?: boolean; |
| 32 | + suppressLocalAudioPlayback?: boolean; |
| 33 | +} |
| 34 | + |
| 35 | +interface MediaTrackCapabilities { |
| 36 | + logicalSurface?: boolean; |
| 37 | + cursor?: string[], |
| 38 | +} |
| 39 | + |
| 40 | +interface CaptureController { |
| 41 | + setFocusBehavior(focusBehavior: CaptureStartFocusBehavior): void; |
| 42 | +} |
| 43 | + |
| 44 | +type CaptureStartFocusBehavior = ( |
| 45 | + | "focus-capturing-application" |
| 46 | + | "focus-captured-surface" |
| 47 | + | "no-focus-change" |
| 48 | +); |
| 49 | + |
| 50 | +declare var CaptureController: { |
| 51 | + prototype: CaptureController; |
| 52 | + new(): CaptureController; |
| 53 | +} |
| 54 | + |
| 55 | +type SelfCapturePreferenceEnum = ( |
| 56 | + | "include" |
| 57 | + | "exclude" |
| 58 | +); |
| 59 | + |
| 60 | +type SystemAudioPreferenceEnum = ( |
| 61 | + | "include" |
| 62 | + | "exclude" |
| 63 | +); |
| 64 | + |
| 65 | +type SurfaceSwitchingPreferenceEnum = ( |
| 66 | + | "include" |
| 67 | + | "exclude" |
| 68 | +); |
| 69 | + |
| 70 | +type MonitorTypeSurfacesEnum = ( |
| 71 | + | "include" |
| 72 | + | "exclude" |
| 73 | +); |
0 commit comments