Skip to content

Commit

Permalink
Merge pull request #451 from a-tarasyuk/feature/update-webrtc-types
Browse files Browse the repository at this point in the history
Remove RTCStatsEventInit definition from addedTypes.json, update WebRTC types
  • Loading branch information
mhegazy authored Apr 23, 2018
2 parents 2c907df + 68a2e80 commit ae4137a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 23 deletions.
22 changes: 16 additions & 6 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1482,21 +1482,27 @@ interface RTCRtpCodecParameters {
sdpFmtpLine?: string;
}

interface RTCRtpCodingParameters {
rid?: string;
}

interface RTCRtpContributingSource {
audioLevel?: number;
source: number;
timestamp: number;
}

interface RTCRtpEncodingParameters {
interface RTCRtpDecodingParameters extends RTCRtpCodingParameters {
}

interface RTCRtpEncodingParameters extends RTCRtpCodingParameters {
active?: boolean;
codecPayloadType?: number;
dtx?: RTCDtxStatus;
maxBitrate?: number;
maxFramerate?: number;
priority?: RTCPriorityType;
ptime?: number;
rid?: string;
scaleResolutionDownBy?: number;
}

Expand Down Expand Up @@ -1524,17 +1530,21 @@ interface RTCRtpHeaderExtensionParameters {

interface RTCRtpParameters {
codecs: RTCRtpCodecParameters[];
encodings: RTCRtpEncodingParameters[];
headerExtensions: RTCRtpHeaderExtensionParameters[];
rtcp: RTCRtcpParameters;
}

interface RTCRtpReceiveParameters extends RTCRtpParameters {
encodings: RTCRtpDecodingParameters[];
}

interface RTCRtpRtxParameters {
ssrc?: number;
}

interface RTCRtpSendParameters extends RTCRtpParameters {
degradationPreference?: RTCDegradationPreference;
encodings: RTCRtpEncodingParameters[];
transactionId: string;
}

Expand Down Expand Up @@ -1585,8 +1595,8 @@ interface RTCStats {
type: RTCStatsType;
}

interface RTCStatsEventInit {
report?: RTCStatsReport;
interface RTCStatsEventInit extends EventInit {
report: RTCStatsReport;
}

interface RTCStatsReport {
Expand Down Expand Up @@ -10964,7 +10974,7 @@ interface RTCRtpReceiver {
readonly track: MediaStreamTrack;
readonly transport: RTCDtlsTransport | null;
getContributingSources(): RTCRtpContributingSource[];
getParameters(): RTCRtpParameters;
getParameters(): RTCRtpReceiveParameters;
getStats(): Promise<RTCStatsReport>;
getSynchronizationSources(): RTCRtpSynchronizationSource[];
}
Expand Down
13 changes: 0 additions & 13 deletions inputfiles/addedTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -2311,19 +2311,6 @@
},
"dictionaries": {
"dictionary": {
"RTCStatsEventInit": {
"specs": "webrtc",
"name": "RTCStatsEventInit",
"members": {
"member": {
"report": {
"type-original": "RTCStatsReport",
"type": "RTCStatsReport",
"name": "report"
}
}
}
},
"MessageEventInit": {
"name": "MessageEventInit",
"members": {
Expand Down
22 changes: 18 additions & 4 deletions inputfiles/idl/WebRTC.widl
Original file line number Diff line number Diff line change
Expand Up @@ -282,26 +282,36 @@ enum RTCRtpTransceiverDirection {
};

dictionary RTCRtpParameters {
required sequence<RTCRtpEncodingParameters> encodings;
required sequence<RTCRtpHeaderExtensionParameters> headerExtensions;
required RTCRtcpParameters rtcp;
required sequence<RTCRtpCodecParameters> codecs;
};

dictionary RTCRtpSendParameters : RTCRtpParameters {
required DOMString transactionId;
required sequence<RTCRtpEncodingParameters> encodings;
RTCDegradationPreference degradationPreference = "balanced";
};

dictionary RTCRtpEncodingParameters {
dictionary RTCRtpReceiveParameters : RTCRtpParameters {
required sequence<RTCRtpDecodingParameters> encodings;
};

dictionary RTCRtpCodingParameters {
DOMString rid;
};

dictionary RTCRtpDecodingParameters : RTCRtpCodingParameters {
};

dictionary RTCRtpEncodingParameters : RTCRtpCodingParameters {
octet codecPayloadType;
RTCDtxStatus dtx;
boolean active = true;
RTCPriorityType priority = "low";
unsigned long ptime;
unsigned long maxBitrate;
double maxFramerate;
DOMString rid;
double scaleResolutionDownBy;
};

Expand Down Expand Up @@ -356,7 +366,7 @@ dictionary RTCRtpHeaderExtensionCapability {
readonly attribute RTCDtlsTransport? transport;
readonly attribute RTCDtlsTransport? rtcpTransport;
static RTCRtpCapabilities getCapabilities (DOMString kind);
RTCRtpParameters getParameters ();
RTCRtpReceiveParameters getParameters ();
sequence<RTCRtpContributingSource> getContributingSources ();
sequence<RTCRtpSynchronizationSource> getSynchronizationSources ();
Promise<RTCStatsReport> getStats();
Expand Down Expand Up @@ -586,6 +596,10 @@ dictionary RTCStats {
readonly attribute RTCStatsReport report;
};

dictionary RTCStatsEventInit : EventInit {
required RTCStatsReport report;
};

[Global, Exposed=RTCIdentityProviderGlobalScope]
interface RTCIdentityProviderGlobalScope : WorkerGlobalScope {
readonly attribute RTCIdentityProviderRegistrar rtcIdentityProvider;
Expand Down

0 comments on commit ae4137a

Please sign in to comment.