summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBasilisk-Dev <basiliskdev@protonmail.com>2023-10-09 17:02:11 -0400
committerBasilisk-Dev <basiliskdev@protonmail.com>2023-10-09 17:02:11 -0400
commit09e6d13d6b2fd2851ea8076efb72f219cd65c2cd (patch)
tree9b5ae1bb5ca4db18eab79e85e592c613809b2bb3
parent69cfed48da18688dc48e9a2576fa5a8b29747e09 (diff)
downloaduxp-09e6d13d6b2fd2851ea8076efb72f219cd65c2cd.tar.gz
Issue #2332 - Update RTCIceCandidate to spec
Backport of https://bugzilla.mozilla.org/show_bug.cgi?id=1263312 - part 1
-rw-r--r--dom/media/PeerConnection.js8
-rw-r--r--dom/webidl/RTCIceCandidate.webidl8
2 files changed, 6 insertions, 10 deletions
diff --git a/dom/media/PeerConnection.js b/dom/media/PeerConnection.js
index f735e371c1..991cf5798f 100644
--- a/dom/media/PeerConnection.js
+++ b/dom/media/PeerConnection.js
@@ -227,9 +227,7 @@ GlobalPCList.prototype = {
};
var _globalPCList = new GlobalPCList();
-function RTCIceCandidate() {
- this.candidate = this.sdpMid = this.sdpMLineIndex = null;
-}
+function RTCIceCandidate() {}
RTCIceCandidate.prototype = {
classDescription: "RTCIceCandidate",
classID: PC_ICE_CID,
@@ -240,9 +238,7 @@ RTCIceCandidate.prototype = {
init: function(win) { this._win = win; },
__init: function(dict) {
- this.candidate = dict.candidate;
- this.sdpMid = dict.sdpMid;
- this.sdpMLineIndex = ("sdpMLineIndex" in dict)? dict.sdpMLineIndex : null;
+ Object.assign(this, dict);
}
};
diff --git a/dom/webidl/RTCIceCandidate.webidl b/dom/webidl/RTCIceCandidate.webidl
index 67d479aef2..35b404bb7d 100644
--- a/dom/webidl/RTCIceCandidate.webidl
+++ b/dom/webidl/RTCIceCandidate.webidl
@@ -8,16 +8,16 @@
*/
dictionary RTCIceCandidateInit {
- DOMString? candidate = null;
+ required DOMString candidate;
DOMString? sdpMid = null;
- unsigned short sdpMLineIndex;
+ unsigned short? sdpMLineIndex = null;
};
[Pref="media.peerconnection.enabled",
JSImplementation="@mozilla.org/dom/rtcicecandidate;1",
- Constructor(optional RTCIceCandidateInit candidateInitDict)]
+ Constructor(RTCIceCandidateInit candidateInitDict)]
interface RTCIceCandidate {
- attribute DOMString? candidate;
+ attribute DOMString candidate;
attribute DOMString? sdpMid;
attribute unsigned short? sdpMLineIndex;