зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1882399 - Update sLD and sRD to spec wrt WebIDL inputs RTCSessionDescriptionInit/RTCLocalSessionDescriptionInit. r=bwc,webidl,saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D203046
This commit is contained in:
Родитель
765e428d7a
Коммит
a3249bbbcf
|
@ -245,11 +245,6 @@ export class RTCSessionDescription {
|
||||||
}
|
}
|
||||||
|
|
||||||
__init({ type, sdp }) {
|
__init({ type, sdp }) {
|
||||||
if (!type) {
|
|
||||||
throw new this._win.TypeError(
|
|
||||||
"Missing required 'type' member of RTCSessionDescriptionInit"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Object.assign(this, { _type: type, _sdp: sdp });
|
Object.assign(this, { _type: type, _sdp: sdp });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1193,11 +1188,6 @@ export class RTCPeerConnection {
|
||||||
}
|
}
|
||||||
|
|
||||||
_setRemoteDescription({ type, sdp }) {
|
_setRemoteDescription({ type, sdp }) {
|
||||||
if (!type) {
|
|
||||||
throw new this._win.TypeError(
|
|
||||||
"Missing required 'type' member of RTCSessionDescriptionInit"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (type == "pranswer") {
|
if (type == "pranswer") {
|
||||||
throw new this._win.DOMException(
|
throw new this._win.DOMException(
|
||||||
"pranswer not yet implemented",
|
"pranswer not yet implemented",
|
||||||
|
|
|
@ -90,8 +90,7 @@ dictionary RTCOfferOptions : RTCOfferAnswerOptions {
|
||||||
Exposed=Window]
|
Exposed=Window]
|
||||||
interface RTCPeerConnection : EventTarget {
|
interface RTCPeerConnection : EventTarget {
|
||||||
[Throws]
|
[Throws]
|
||||||
constructor(optional RTCConfiguration configuration = {},
|
constructor(optional RTCConfiguration configuration = {});
|
||||||
optional object? constraints);
|
|
||||||
|
|
||||||
[Throws, StaticClassOverride="mozilla::dom::RTCCertificate"]
|
[Throws, StaticClassOverride="mozilla::dom::RTCCertificate"]
|
||||||
static Promise<RTCCertificate> generateCertificate (AlgorithmIdentifier keygenAlgorithm);
|
static Promise<RTCCertificate> generateCertificate (AlgorithmIdentifier keygenAlgorithm);
|
||||||
|
@ -99,13 +98,13 @@ interface RTCPeerConnection : EventTarget {
|
||||||
undefined setIdentityProvider (DOMString provider,
|
undefined setIdentityProvider (DOMString provider,
|
||||||
optional RTCIdentityProviderOptions options = {});
|
optional RTCIdentityProviderOptions options = {});
|
||||||
Promise<DOMString> getIdentityAssertion();
|
Promise<DOMString> getIdentityAssertion();
|
||||||
Promise<RTCSessionDescriptionInit> createOffer (optional RTCOfferOptions options = {});
|
Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions options = {});
|
||||||
Promise<RTCSessionDescriptionInit> createAnswer (optional RTCAnswerOptions options = {});
|
Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions options = {});
|
||||||
Promise<undefined> setLocalDescription (optional RTCSessionDescriptionInit description = {});
|
Promise<undefined> setLocalDescription(optional RTCLocalSessionDescriptionInit description = {});
|
||||||
Promise<undefined> setRemoteDescription (optional RTCSessionDescriptionInit description = {});
|
|
||||||
readonly attribute RTCSessionDescription? localDescription;
|
readonly attribute RTCSessionDescription? localDescription;
|
||||||
readonly attribute RTCSessionDescription? currentLocalDescription;
|
readonly attribute RTCSessionDescription? currentLocalDescription;
|
||||||
readonly attribute RTCSessionDescription? pendingLocalDescription;
|
readonly attribute RTCSessionDescription? pendingLocalDescription;
|
||||||
|
Promise<undefined> setRemoteDescription(RTCSessionDescriptionInit description);
|
||||||
readonly attribute RTCSessionDescription? remoteDescription;
|
readonly attribute RTCSessionDescription? remoteDescription;
|
||||||
readonly attribute RTCSessionDescription? currentRemoteDescription;
|
readonly attribute RTCSessionDescription? currentRemoteDescription;
|
||||||
readonly attribute RTCSessionDescription? pendingRemoteDescription;
|
readonly attribute RTCSessionDescription? pendingRemoteDescription;
|
||||||
|
@ -181,21 +180,23 @@ interface RTCPeerConnection : EventTarget {
|
||||||
|
|
||||||
partial interface RTCPeerConnection {
|
partial interface RTCPeerConnection {
|
||||||
|
|
||||||
// Dummy Promise<undefined> return values avoid "WebIDL.WebIDLError: error:
|
// Legacy Interface Extensions
|
||||||
// We have overloads with both Promise and non-Promise return types"
|
// Supporting the methods in this section is optional.
|
||||||
|
// If these methods are supported
|
||||||
Promise<undefined> createOffer (RTCSessionDescriptionCallback successCallback,
|
// they must be implemented as defined
|
||||||
RTCPeerConnectionErrorCallback failureCallback,
|
// in section "Legacy Interface Extensions"
|
||||||
optional RTCOfferOptions options = {});
|
Promise<undefined> createOffer(RTCSessionDescriptionCallback successCallback,
|
||||||
Promise<undefined> createAnswer (RTCSessionDescriptionCallback successCallback,
|
RTCPeerConnectionErrorCallback failureCallback,
|
||||||
RTCPeerConnectionErrorCallback failureCallback);
|
optional RTCOfferOptions options = {});
|
||||||
Promise<undefined> setLocalDescription (RTCSessionDescriptionInit description,
|
Promise<undefined> setLocalDescription(RTCLocalSessionDescriptionInit description,
|
||||||
|
VoidFunction successCallback,
|
||||||
|
RTCPeerConnectionErrorCallback failureCallback);
|
||||||
|
Promise<undefined> createAnswer(RTCSessionDescriptionCallback successCallback,
|
||||||
|
RTCPeerConnectionErrorCallback failureCallback);
|
||||||
|
Promise<undefined> setRemoteDescription(RTCSessionDescriptionInit description,
|
||||||
VoidFunction successCallback,
|
VoidFunction successCallback,
|
||||||
RTCPeerConnectionErrorCallback failureCallback);
|
RTCPeerConnectionErrorCallback failureCallback);
|
||||||
Promise<undefined> setRemoteDescription (RTCSessionDescriptionInit description,
|
Promise<undefined> addIceCandidate(RTCIceCandidateInit candidate,
|
||||||
VoidFunction successCallback,
|
VoidFunction successCallback,
|
||||||
RTCPeerConnectionErrorCallback failureCallback);
|
RTCPeerConnectionErrorCallback failureCallback);
|
||||||
Promise<undefined> addIceCandidate (RTCIceCandidate candidate,
|
|
||||||
VoidFunction successCallback,
|
|
||||||
RTCPeerConnectionErrorCallback failureCallback);
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* The origin of this IDL file is
|
* The origin of this IDL file is
|
||||||
* http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCSessionDescription
|
* https://www.w3.org/TR/webrtc/#rtcsessiondescription-class
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum RTCSdpType {
|
enum RTCSdpType {
|
||||||
|
@ -15,6 +15,11 @@ enum RTCSdpType {
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary RTCSessionDescriptionInit {
|
dictionary RTCSessionDescriptionInit {
|
||||||
|
required RTCSdpType type;
|
||||||
|
DOMString sdp = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary RTCLocalSessionDescriptionInit {
|
||||||
RTCSdpType type;
|
RTCSdpType type;
|
||||||
DOMString sdp = "";
|
DOMString sdp = "";
|
||||||
};
|
};
|
||||||
|
@ -24,7 +29,7 @@ dictionary RTCSessionDescriptionInit {
|
||||||
Exposed=Window]
|
Exposed=Window]
|
||||||
interface RTCSessionDescription {
|
interface RTCSessionDescription {
|
||||||
[Throws]
|
[Throws]
|
||||||
constructor(optional RTCSessionDescriptionInit descriptionInitDict = {});
|
constructor(RTCSessionDescriptionInit descriptionInitDict);
|
||||||
|
|
||||||
// These should be readonly, but writing causes deprecation warnings for a bit
|
// These should be readonly, but writing causes deprecation warnings for a bit
|
||||||
attribute RTCSdpType type;
|
attribute RTCSdpType type;
|
||||||
|
|
|
@ -296,15 +296,6 @@
|
||||||
[RTCRtpTransceiver interface: calling setCodecPreferences(sequence<RTCRtpCodecCapability>) on new RTCPeerConnection().addTransceiver('audio') with too few arguments must throw TypeError]
|
[RTCRtpTransceiver interface: calling setCodecPreferences(sequence<RTCRtpCodecCapability>) on new RTCPeerConnection().addTransceiver('audio') with too few arguments must throw TypeError]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[RTCPeerConnection interface: operation setRemoteDescription(RTCSessionDescriptionInit, VoidFunction, RTCPeerConnectionErrorCallback)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[RTCPeerConnection interface: operation setRemoteDescription(RTCSessionDescriptionInit)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[RTCSessionDescription interface object length]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[RTCDataChannel interface: new RTCPeerConnection().createDataChannel('') must inherit property "binaryType" with the proper type]
|
[RTCDataChannel interface: new RTCPeerConnection().createDataChannel('') must inherit property "binaryType" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче