Skip to content

Commit f81a276

Browse files
committed
add Identity for WebRTC types
1 parent 1916afc commit f81a276

File tree

5 files changed

+76
-74
lines changed

5 files changed

+76
-74
lines changed

baselines/dom.generated.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11537,7 +11537,7 @@ interface RTCRtpReceiver {
1153711537
declare var RTCRtpReceiver: {
1153811538
prototype: RTCRtpReceiver;
1153911539
new(): RTCRtpReceiver;
11540-
getCapabilities(kind: string): RTCRtpCapabilities;
11540+
getCapabilities(kind: string): RTCRtpCapabilities | null;
1154111541
};
1154211542

1154311543
interface RTCRtpSender {
@@ -11555,7 +11555,7 @@ interface RTCRtpSender {
1155511555
declare var RTCRtpSender: {
1155611556
prototype: RTCRtpSender;
1155711557
new(): RTCRtpSender;
11558-
getCapabilities(kind: string): RTCRtpCapabilities;
11558+
getCapabilities(kind: string): RTCRtpCapabilities | null;
1155911559
};
1156011560

1156111561
interface RTCRtpTransceiver {
@@ -17665,7 +17665,7 @@ type RTCPeerConnectionState = "new" | "connecting" | "connected" | "disconnected
1766517665
type RTCPriorityType = "very-low" | "low" | "medium" | "high";
1766617666
type RTCRtcpMuxPolicy = "negotiate" | "require";
1766717667
type RTCRtpTransceiverDirection = "sendrecv" | "sendonly" | "recvonly" | "inactive";
17668-
type RTCSctpTransportState = "new" | "connecting" | "connected" | "closed";
17668+
type RTCSctpTransportState = "connecting" | "connected" | "closed";
1766917669
type RTCSdpType = "offer" | "pranswer" | "answer" | "rollback";
1767017670
type RTCSignalingState = "stable" | "have-local-offer" | "have-remote-offer" | "have-local-pranswer" | "have-remote-pranswer" | "closed";
1767117671
type RTCStatsIceCandidatePairState = "frozen" | "waiting" | "inprogress" | "failed" | "succeeded" | "cancelled";
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
[Global, Exposed=RTCIdentityProviderGlobalScope]
2+
interface RTCIdentityProviderGlobalScope : WorkerGlobalScope {
3+
readonly attribute RTCIdentityProviderRegistrar rtcIdentityProvider;
4+
};
5+
6+
[Exposed=RTCIdentityProviderGlobalScope]
7+
interface RTCIdentityProviderRegistrar {
8+
void register (RTCIdentityProvider idp);
9+
};
10+
11+
dictionary RTCIdentityProvider {
12+
required GenerateAssertionCallback generateAssertion;
13+
required ValidateAssertionCallback validateAssertion;
14+
};
15+
16+
callback GenerateAssertionCallback = Promise<RTCIdentityAssertionResult>
17+
(DOMString contents, DOMString origin, RTCIdentityProviderOptions options);
18+
19+
callback ValidateAssertionCallback = Promise<RTCIdentityValidationResult>
20+
(DOMString assertion, DOMString origin);
21+
22+
dictionary RTCIdentityAssertionResult {
23+
required RTCIdentityProviderDetails idp;
24+
required DOMString assertion;
25+
};
26+
27+
dictionary RTCIdentityProviderDetails {
28+
required DOMString domain;
29+
DOMString protocol = "default";
30+
};
31+
32+
dictionary RTCIdentityValidationResult {
33+
required DOMString identity;
34+
required DOMString contents;
35+
};
36+
37+
partial interface RTCPeerConnection {
38+
void setIdentityProvider (DOMString provider, optional RTCIdentityProviderOptions options);
39+
Promise<DOMString> getIdentityAssertion ();
40+
readonly attribute Promise<RTCIdentityAssertion> peerIdentity;
41+
readonly attribute DOMString? idpLoginUrl;
42+
readonly attribute DOMString? idpErrorInfo;
43+
};
44+
45+
dictionary RTCIdentityProviderOptions {
46+
DOMString protocol = "default";
47+
DOMString usernameHint;
48+
DOMString peerIdentity;
49+
};
50+
51+
[Constructor(DOMString idp, DOMString name), Exposed=Window]
52+
interface RTCIdentityAssertion {
53+
attribute DOMString idp;
54+
attribute DOMString name;
55+
};
56+
57+
partial dictionary MediaStreamConstraints {
58+
DOMString peerIdentity;
59+
};
60+
61+
partial interface MediaStreamTrack {
62+
readonly attribute boolean isolated;
63+
attribute EventHandler onisolationchange;
64+
};

inputfiles/idl/WebRTC.widl

Lines changed: 2 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ enum RTCRtpTransceiverDirection {
274274
readonly attribute MediaStreamTrack? track;
275275
readonly attribute RTCDtlsTransport? transport;
276276
readonly attribute RTCDtlsTransport? rtcpTransport;
277-
static RTCRtpCapabilities getCapabilities (DOMString kind);
277+
static RTCRtpCapabilities? getCapabilities (DOMString kind);
278278
Promise<void> setParameters (RTCRtpSendParameters parameters);
279279
RTCRtpSendParameters getParameters ();
280280
Promise<void> replaceTrack (MediaStreamTrack? withTrack);
@@ -366,7 +366,7 @@ dictionary RTCRtpHeaderExtensionCapability {
366366
readonly attribute MediaStreamTrack track;
367367
readonly attribute RTCDtlsTransport? transport;
368368
readonly attribute RTCDtlsTransport? rtcpTransport;
369-
static RTCRtpCapabilities getCapabilities (DOMString kind);
369+
static RTCRtpCapabilities? getCapabilities (DOMString kind);
370370
RTCRtpReceiveParameters getParameters ();
371371
sequence<RTCRtpContributingSource> getContributingSources ();
372372
sequence<RTCRtpSynchronizationSource> getSynchronizationSources ();
@@ -499,7 +499,6 @@ partial interface RTCPeerConnection {
499499
};
500500

501501
enum RTCSctpTransportState {
502-
"new",
503502
"connecting",
504503
"connected",
505504
"closed"
@@ -602,71 +601,6 @@ dictionary RTCStatsEventInit : EventInit {
602601
required RTCStatsReport report;
603602
};
604603

605-
[Global, Exposed=RTCIdentityProviderGlobalScope]
606-
interface RTCIdentityProviderGlobalScope : WorkerGlobalScope {
607-
readonly attribute RTCIdentityProviderRegistrar rtcIdentityProvider;
608-
};
609-
610-
[Exposed=RTCIdentityProviderGlobalScope]
611-
interface RTCIdentityProviderRegistrar {
612-
void register (RTCIdentityProvider idp);
613-
};
614-
615-
dictionary RTCIdentityProvider {
616-
required GenerateAssertionCallback generateAssertion;
617-
required ValidateAssertionCallback validateAssertion;
618-
};
619-
620-
callback GenerateAssertionCallback = Promise<RTCIdentityAssertionResult>
621-
(DOMString contents, DOMString origin, RTCIdentityProviderOptions options);
622-
623-
callback ValidateAssertionCallback = Promise<RTCIdentityValidationResult>
624-
(DOMString assertion, DOMString origin);
625-
626-
dictionary RTCIdentityAssertionResult {
627-
required RTCIdentityProviderDetails idp;
628-
required DOMString assertion;
629-
};
630-
631-
dictionary RTCIdentityProviderDetails {
632-
required DOMString domain;
633-
DOMString protocol = "default";
634-
};
635-
636-
dictionary RTCIdentityValidationResult {
637-
required DOMString identity;
638-
required DOMString contents;
639-
};
640-
641-
partial interface RTCPeerConnection {
642-
void setIdentityProvider (DOMString provider, optional RTCIdentityProviderOptions options);
643-
Promise<DOMString> getIdentityAssertion ();
644-
readonly attribute Promise<RTCIdentityAssertion> peerIdentity;
645-
readonly attribute DOMString? idpLoginUrl;
646-
readonly attribute DOMString? idpErrorInfo;
647-
};
648-
649-
dictionary RTCIdentityProviderOptions {
650-
DOMString protocol = "default";
651-
DOMString usernameHint;
652-
DOMString peerIdentity;
653-
};
654-
655-
[Constructor(DOMString idp, DOMString name), Exposed=Window]
656-
interface RTCIdentityAssertion {
657-
attribute DOMString idp;
658-
attribute DOMString name;
659-
};
660-
661-
partial dictionary MediaStreamConstraints {
662-
DOMString peerIdentity;
663-
};
664-
665-
partial interface MediaStreamTrack {
666-
readonly attribute boolean isolated;
667-
attribute EventHandler onisolationchange;
668-
};
669-
670604
enum RTCErrorDetailType {
671605
"data-channel-failure",
672606
"dtls-failure",

inputfiles/idlSources.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@
154154
"url": "https://html.spec.whatwg.org/multipage/interaction.html",
155155
"title": "HTML - User interaction"
156156
},
157+
{
158+
"url": "https://w3c.github.io/webrtc-pc/identity.html",
159+
"title": "Identity for WebRTC"
160+
},
157161
{
158162
"url": "https://www.w3.org/TR/IndexedDB-2/",
159163
"title": "Indexed Database"

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)