Skip to content
Permalink
Browse files

Add RTCIceCandidate::ToJSON

  • Loading branch information...
Manishearth committed Jan 29, 2019
1 parent b7e2e79 commit 0d9f5385610cb694f03a932f1a3152bfbdfd952b
Showing with 11 additions and 1 deletion.
  1. +10 −0 components/script/dom/rtcicecandidate.rs
  2. +1 −1 components/script/dom/webidls/RTCIceCandidate.webidl
@@ -98,4 +98,14 @@ impl RTCIceCandidateMethods for RTCIceCandidate {
fn GetUsernameFragment(&self) -> Option<DOMString> {
self.username_fragment.clone()
}

/// https://w3c.github.io/webrtc-pc/#dom-rtcicecandidate-tojson
fn ToJSON(&self) -> RTCIceCandidateInit {
RTCIceCandidateInit {
candidate: self.candidate.clone(),
sdpMid: self.sdp_m_id.clone(),
sdpMLineIndex: self.sdp_m_line_index.clone(),
usernameFragment: self.username_fragment.clone(),
}
}
}
@@ -22,7 +22,7 @@ interface RTCIceCandidate {
// readonly attribute DOMString? relatedAddress;
// readonly attribute unsigned short? relatedPort;
readonly attribute DOMString? usernameFragment;
// RTCIceCandidateInit toJSON();
RTCIceCandidateInit toJSON();
};

dictionary RTCIceCandidateInit {

0 comments on commit 0d9f538

Please sign in to comment.
You can’t perform that action at this time.