@@ -236,7 +236,7 @@ interface ConstrainDoubleRange extends DoubleRange {
236
236
ideal?: number;
237
237
}
238
238
239
- interface ConstrainLongRange extends LongRange {
239
+ interface ConstrainULongRange extends ULongRange {
240
240
exact?: number;
241
241
ideal?: number;
242
242
}
@@ -606,11 +606,6 @@ interface KeyframeEffectOptions extends EffectTiming {
606
606
iterationComposite?: IterationCompositeOperation;
607
607
}
608
608
609
- interface LongRange {
610
- max?: number;
611
- min?: number;
612
- }
613
-
614
609
interface MediaElementAudioSourceOptions {
615
610
mediaElement: HTMLMediaElement;
616
611
}
@@ -668,39 +663,45 @@ interface MediaStreamTrackAudioSourceOptions {
668
663
}
669
664
670
665
interface MediaStreamTrackEventInit extends EventInit {
671
- track? : MediaStreamTrack | null ;
666
+ track: MediaStreamTrack;
672
667
}
673
668
674
669
interface MediaTrackCapabilities {
675
- aspectRatio?: number | DoubleRange;
670
+ aspectRatio?: DoubleRange;
671
+ autoGainControl?: boolean[];
672
+ channelCount?: ULongRange;
676
673
deviceId?: string;
677
674
echoCancellation?: boolean[];
678
- facingMode?: string;
679
- frameRate?: number | DoubleRange;
675
+ facingMode?: string[] ;
676
+ frameRate?: DoubleRange;
680
677
groupId?: string;
681
- height?: number | LongRange;
682
- sampleRate?: number | LongRange;
683
- sampleSize?: number | LongRange;
684
- volume?: number | DoubleRange;
685
- width?: number | LongRange;
678
+ height?: ULongRange;
679
+ latency?: DoubleRange;
680
+ noiseSuppression?: boolean[];
681
+ resizeMode?: string[];
682
+ sampleRate?: ULongRange;
683
+ sampleSize?: ULongRange;
684
+ volume?: DoubleRange;
685
+ width?: ULongRange;
686
686
}
687
687
688
688
interface MediaTrackConstraintSet {
689
- aspectRatio?: number | ConstrainDoubleRange;
690
- channelCount?: number | ConstrainLongRange;
691
- deviceId?: string | string[] | ConstrainDOMStringParameters;
692
- displaySurface?: string | string[] | ConstrainDOMStringParameters;
693
- echoCancellation?: boolean | ConstrainBooleanParameters;
694
- facingMode?: string | string[] | ConstrainDOMStringParameters;
695
- frameRate?: number | ConstrainDoubleRange;
696
- groupId?: string | string[] | ConstrainDOMStringParameters;
697
- height?: number | ConstrainLongRange;
698
- latency?: number | ConstrainDoubleRange;
699
- logicalSurface?: boolean | ConstrainBooleanParameters;
700
- sampleRate?: number | ConstrainLongRange;
701
- sampleSize?: number | ConstrainLongRange;
702
- volume?: number | ConstrainDoubleRange;
703
- width?: number | ConstrainLongRange;
689
+ aspectRatio?: ConstrainDouble;
690
+ autoGainControl?: ConstrainBoolean;
691
+ channelCount?: ConstrainULong;
692
+ deviceId?: ConstrainDOMString;
693
+ echoCancellation?: ConstrainBoolean;
694
+ facingMode?: ConstrainDOMString;
695
+ frameRate?: ConstrainDouble;
696
+ groupId?: ConstrainDOMString;
697
+ height?: ConstrainULong;
698
+ latency?: ConstrainDouble;
699
+ noiseSuppression?: ConstrainBoolean;
700
+ resizeMode?: ConstrainDOMString;
701
+ sampleRate?: ConstrainULong;
702
+ sampleSize?: ConstrainULong;
703
+ volume?: ConstrainDouble;
704
+ width?: ConstrainULong;
704
705
}
705
706
706
707
interface MediaTrackConstraints extends MediaTrackConstraintSet {
@@ -709,12 +710,17 @@ interface MediaTrackConstraints extends MediaTrackConstraintSet {
709
710
710
711
interface MediaTrackSettings {
711
712
aspectRatio?: number;
713
+ autoGainControl?: boolean;
714
+ channelCount?: number;
712
715
deviceId?: string;
713
716
echoCancellation?: boolean;
714
717
facingMode?: string;
715
718
frameRate?: number;
716
719
groupId?: string;
717
720
height?: number;
721
+ latency?: number;
722
+ noiseSuppression?: boolean;
723
+ resizeMode?: string;
718
724
sampleRate?: number;
719
725
sampleSize?: number;
720
726
volume?: number;
@@ -723,12 +729,17 @@ interface MediaTrackSettings {
723
729
724
730
interface MediaTrackSupportedConstraints {
725
731
aspectRatio?: boolean;
732
+ autoGainControl?: boolean;
733
+ channelCount?: boolean;
726
734
deviceId?: boolean;
727
735
echoCancellation?: boolean;
728
736
facingMode?: boolean;
729
737
frameRate?: boolean;
730
738
groupId?: boolean;
731
739
height?: boolean;
740
+ latency?: boolean;
741
+ noiseSuppression?: boolean;
742
+ resizeMode?: boolean;
732
743
sampleRate?: boolean;
733
744
sampleSize?: boolean;
734
745
volume?: boolean;
@@ -1576,6 +1587,11 @@ interface UIEventInit extends EventInit {
1576
1587
view?: Window | null;
1577
1588
}
1578
1589
1590
+ interface ULongRange {
1591
+ max?: number;
1592
+ min?: number;
1593
+ }
1594
+
1579
1595
interface UnderlyingByteSource {
1580
1596
autoAllocateChunkSize?: number;
1581
1597
cancel?: ReadableStreamErrorCallback;
@@ -9421,6 +9437,15 @@ interface InnerHTML {
9421
9437
innerHTML: string;
9422
9438
}
9423
9439
9440
+ interface InputDeviceInfo extends MediaDeviceInfo {
9441
+ getCapabilities(): MediaTrackCapabilities;
9442
+ }
9443
+
9444
+ declare var InputDeviceInfo: {
9445
+ prototype: InputDeviceInfo;
9446
+ new(): InputDeviceInfo;
9447
+ };
9448
+
9424
9449
/** provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. */
9425
9450
interface IntersectionObserver {
9426
9451
readonly root: Element | null;
@@ -9853,6 +9878,7 @@ interface MediaDeviceInfo {
9853
9878
readonly groupId: string;
9854
9879
readonly kind: MediaDeviceKind;
9855
9880
readonly label: string;
9881
+ toJSON(): any;
9856
9882
}
9857
9883
9858
9884
declare var MediaDeviceInfo: {
@@ -9869,7 +9895,7 @@ interface MediaDevices extends EventTarget {
9869
9895
ondevicechange: ((this: MediaDevices, ev: Event) => any) | null;
9870
9896
enumerateDevices(): Promise<MediaDeviceInfo[]>;
9871
9897
getSupportedConstraints(): MediaTrackSupportedConstraints;
9872
- getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
9898
+ getUserMedia(constraints? : MediaStreamConstraints): Promise<MediaStream>;
9873
9899
addEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
9874
9900
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
9875
9901
removeEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -10081,19 +10107,15 @@ declare var MediaSource: {
10081
10107
};
10082
10108
10083
10109
interface MediaStreamEventMap {
10084
- "active": Event;
10085
10110
"addtrack": MediaStreamTrackEvent;
10086
- "inactive": Event;
10087
10111
"removetrack": MediaStreamTrackEvent;
10088
10112
}
10089
10113
10090
10114
/** A stream of media content. A stream consists of several tracks such as video or audio tracks. Each track is specified as an instance of MediaStreamTrack. */
10091
10115
interface MediaStream extends EventTarget {
10092
10116
readonly active: boolean;
10093
10117
readonly id: string;
10094
- onactive: ((this: MediaStream, ev: Event) => any) | null;
10095
10118
onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
10096
- oninactive: ((this: MediaStream, ev: Event) => any) | null;
10097
10119
onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
10098
10120
addTrack(track: MediaStreamTrack): void;
10099
10121
clone(): MediaStream;
@@ -10102,7 +10124,6 @@ interface MediaStream extends EventTarget {
10102
10124
getTracks(): MediaStreamTrack[];
10103
10125
getVideoTracks(): MediaStreamTrack[];
10104
10126
removeTrack(track: MediaStreamTrack): void;
10105
- stop(): void;
10106
10127
addEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
10107
10128
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
10108
10129
removeEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -10166,7 +10187,7 @@ declare var MediaStreamEvent: {
10166
10187
};
10167
10188
10168
10189
interface MediaStreamTrackEventMap {
10169
- "ended": MediaStreamErrorEvent ;
10190
+ "ended": Event ;
10170
10191
"isolationchange": Event;
10171
10192
"mute": Event;
10172
10193
"overconstrained": MediaStreamErrorEvent;
@@ -10181,15 +10202,13 @@ interface MediaStreamTrack extends EventTarget {
10181
10202
readonly kind: string;
10182
10203
readonly label: string;
10183
10204
readonly muted: boolean;
10184
- onended: ((this: MediaStreamTrack, ev: MediaStreamErrorEvent ) => any) | null;
10205
+ onended: ((this: MediaStreamTrack, ev: Event ) => any) | null;
10185
10206
onisolationchange: ((this: MediaStreamTrack, ev: Event) => any) | null;
10186
10207
onmute: ((this: MediaStreamTrack, ev: Event) => any) | null;
10187
10208
onoverconstrained: ((this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any) | null;
10188
10209
onunmute: ((this: MediaStreamTrack, ev: Event) => any) | null;
10189
- readonly readonly: boolean;
10190
10210
readonly readyState: MediaStreamTrackState;
10191
- readonly remote: boolean;
10192
- applyConstraints(constraints: MediaTrackConstraints): Promise<void>;
10211
+ applyConstraints(constraints?: MediaTrackConstraints): Promise<void>;
10193
10212
clone(): MediaStreamTrack;
10194
10213
getCapabilities(): MediaTrackCapabilities;
10195
10214
getConstraints(): MediaTrackConstraints;
@@ -10221,7 +10240,7 @@ interface MediaStreamTrackEvent extends Event {
10221
10240
10222
10241
declare var MediaStreamTrackEvent: {
10223
10242
prototype: MediaStreamTrackEvent;
10224
- new(typeArg : string, eventInitDict? : MediaStreamTrackEventInit): MediaStreamTrackEvent;
10243
+ new(type : string, eventInitDict: MediaStreamTrackEventInit): MediaStreamTrackEvent;
10225
10244
};
10226
10245
10227
10246
/** An interface of the Channel Messaging API allows us to create a new message channel and send data through it via its two MessagePort properties. */
@@ -10521,6 +10540,7 @@ interface Navigator extends NavigatorID, NavigatorOnLine, NavigatorContentUtils,
10521
10540
gamepadInputEmulation: GamepadInputEmulationType;
10522
10541
readonly geolocation: Geolocation;
10523
10542
readonly maxTouchPoints: number;
10543
+ readonly mediaDevices: MediaDevices;
10524
10544
readonly mimeTypes: MimeTypeArray;
10525
10545
readonly msManipulationViewsEnabled: boolean;
10526
10546
readonly msMaxTouchPoints: number;
@@ -10531,6 +10551,7 @@ interface Navigator extends NavigatorID, NavigatorOnLine, NavigatorContentUtils,
10531
10551
readonly serviceWorker: ServiceWorkerContainer;
10532
10552
readonly webdriver: boolean;
10533
10553
getGamepads(): (Gamepad | null)[];
10554
+ getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
10534
10555
getVRDisplays(): Promise<VRDisplay[]>;
10535
10556
javaEnabled(): boolean;
10536
10557
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
@@ -10962,6 +10983,15 @@ declare var OscillatorNode: {
10962
10983
new(context: BaseAudioContext, options?: OscillatorOptions): OscillatorNode;
10963
10984
};
10964
10985
10986
+ interface OverconstrainedError extends Error {
10987
+ constraint: string;
10988
+ }
10989
+
10990
+ declare var OverconstrainedError: {
10991
+ prototype: OverconstrainedError;
10992
+ new(): OverconstrainedError;
10993
+ };
10994
+
10965
10995
interface OverflowEvent extends UIEvent {
10966
10996
readonly horizontalOverflow: boolean;
10967
10997
readonly orient: number;
@@ -18444,6 +18474,10 @@ type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
18444
18474
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
18445
18475
type OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull | null;
18446
18476
type TimerHandler = string | Function;
18477
+ type ConstrainULong = number | ConstrainULongRange;
18478
+ type ConstrainDouble = number | ConstrainDoubleRange;
18479
+ type ConstrainBoolean = boolean | ConstrainBooleanParameters;
18480
+ type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
18447
18481
type PerformanceEntryList = PerformanceEntry[];
18448
18482
type VibratePattern = number | number[];
18449
18483
type AlgorithmIdentifier = string | Algorithm;
@@ -18470,10 +18504,6 @@ type FormDataEntryValue = File | string;
18470
18504
type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend";
18471
18505
type IDBValidKey = number | string | Date | BufferSource | IDBArrayKey;
18472
18506
type MutationRecordType = "attributes" | "characterData" | "childList";
18473
- type ConstrainBoolean = boolean | ConstrainBooleanParameters;
18474
- type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
18475
- type ConstrainDouble = number | ConstrainDoubleRange;
18476
- type ConstrainLong = number | ConstrainLongRange;
18477
18507
type IDBKeyPath = string;
18478
18508
type Transferable = ArrayBuffer | MessagePort | ImageBitmap;
18479
18509
type RTCIceGatherCandidate = RTCIceCandidateDictionary | RTCIceCandidateComplete;
0 commit comments