Skip to content

Commit 213a4eb

Browse files
committed
Port #297
1 parent c9fadf0 commit 213a4eb

File tree

4 files changed

+37
-7
lines changed

4 files changed

+37
-7
lines changed

baselines/dom.generated.d.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -827,13 +827,15 @@ interface MediaTrackCapabilities {
827827

828828
interface MediaTrackConstraintSet {
829829
aspectRatio?: number | ConstrainDoubleRange;
830+
channelCount?: number | ConstrainLongRange;
830831
deviceId?: string | string[] | ConstrainDOMStringParameters;
831832
displaySurface?: string | string[] | ConstrainDOMStringParameters;
832-
echoCancelation?: boolean | ConstrainBooleanParameters;
833+
echoCancellation?: boolean | ConstrainBooleanParameters;
833834
facingMode?: string | string[] | ConstrainDOMStringParameters;
834835
frameRate?: number | ConstrainDoubleRange;
835836
groupId?: string | string[] | ConstrainDOMStringParameters;
836837
height?: number | ConstrainLongRange;
838+
latency?: number | ConstrainDoubleRange;
837839
logicalSurface?: boolean | ConstrainBooleanParameters;
838840
sampleRate?: number | ConstrainLongRange;
839841
sampleSize?: number | ConstrainLongRange;
@@ -9696,7 +9698,7 @@ interface Path2D extends CanvasPathMethods {
96969698

96979699
declare var Path2D: {
96989700
prototype: Path2D;
9699-
new(d?: Path2D | string): Path2D;;
9701+
new(d?: Path2D | string): Path2D;
97009702
};
97019703

97029704
interface PaymentAddress {
@@ -10340,7 +10342,7 @@ interface RTCPeerConnection extends EventTarget {
1034010342
addIceCandidate(candidate: RTCIceCandidateInit | RTCIceCandidate): Promise<void>;
1034110343
addStream(stream: MediaStream): void;
1034210344
close(): void;
10343-
createAnswer(options?: RTCAnswerOptions): Promise<RTCSessionDescriptionInit>;
10345+
createAnswer(options?: RTCOfferOptions): Promise<RTCSessionDescriptionInit>;
1034410346
createOffer(options?: RTCOfferOptions): Promise<RTCSessionDescriptionInit>;
1034510347
getConfiguration(): RTCConfiguration;
1034610348
getLocalStreams(): MediaStream[];

inputfiles/overridingTypes.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,7 @@
18371837
"createAnswer": {
18381838
"name": "createAnswer",
18391839
"override-signatures": [
1840-
"createAnswer(options?: RTCAnswerOptions): Promise<RTCSessionDescriptionInit>"
1840+
"createAnswer(options?: RTCOfferOptions): Promise<RTCSessionDescriptionInit>"
18411841
]
18421842
},
18431843
"createOffer": {
@@ -1871,10 +1871,11 @@
18711871
"name": "Path2D",
18721872
"constructor": {
18731873
"override-signatures": [
1874-
"new(d?: Path2D | string): Path2D;"
1874+
"new(d?: Path2D | string): Path2D"
18751875
]
18761876
}
18771877
}
1878+
18781879
}
18791880
},
18801881
"dictionaries": {
@@ -1973,6 +1974,25 @@
19731974
}
19741975
}
19751976
}
1977+
},
1978+
"MediaTrackConstraintSet": {
1979+
"name": "MediaTrackConstraintSet",
1980+
"members": {
1981+
"member": {
1982+
"echoCancellation": {
1983+
"name": "echoCancellation",
1984+
"override-type": "boolean | ConstrainBooleanParameters"
1985+
},
1986+
"channelCount": {
1987+
"name": "channelCount",
1988+
"override-type": "number | ConstrainLongRange"
1989+
},
1990+
"latency": {
1991+
"name": "latency",
1992+
"override-type": "number | ConstrainDoubleRange"
1993+
}
1994+
}
1995+
}
19761996
}
19771997
}
19781998
},

inputfiles/removedTypes.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,15 @@
4444
}
4545
},
4646
"dictionaries": {
47-
"dictionary": {}
47+
"dictionary": {
48+
"MediaTrackConstraintSet": {
49+
"members": {
50+
"member": {
51+
"echoCancelation": {}
52+
}
53+
}
54+
}
55+
}
4856
},
4957
"typedefs": {
5058
"typedef": []

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function emitDom() {
125125

126126
function filterDictionary(dictinaries: Record<string, Browser.Dictionary>, template: Record<string, Browser.Dictionary> | undefined) {
127127
if (!template) return dictinaries;
128-
const result = filterProperties(dictinaries, i => !template[i.name]);
128+
const result = dictinaries;
129129
for (const k in result) {
130130
if (result[k].members) {
131131
result[k].members!.member = filterProperties(dictinaries[k].members!.member, m => !(template[k] && template[k].members && template[k].members!.member[m.name]));

0 commit comments

Comments
 (0)