mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1002831 - Display remote and local SDP on about:webrtc. r=smaug, r=jib
This commit is contained in:
parent
a0a82f96e2
commit
ed80aecb7c
@ -141,6 +141,8 @@ dictionary RTCStatsReportInternal {
|
||||
sequence<RTCIceCandidatePairStats> iceCandidatePairStats;
|
||||
sequence<RTCIceCandidateStats> iceCandidateStats;
|
||||
sequence<RTCCodecStats> codecStats;
|
||||
DOMString localSdp;
|
||||
DOMString remoteSdp;
|
||||
DOMHighResTimeStamp timestamp;
|
||||
boolean closed; // Is the PC now closed
|
||||
};
|
||||
|
@ -2124,6 +2124,14 @@ PeerConnectionImpl::BuildStatsQuery_m(
|
||||
NS_ConvertASCIItoUTF16(mName.c_str()),
|
||||
query->now);
|
||||
|
||||
// Populate SDP on main
|
||||
if (query->internalStats) {
|
||||
query->report.mLocalSdp.Construct(
|
||||
NS_ConvertASCIItoUTF16(mLocalSDP.c_str()));
|
||||
query->report.mRemoteSdp.Construct(
|
||||
NS_ConvertASCIItoUTF16(mRemoteSDP.c_str()));
|
||||
}
|
||||
|
||||
// Gather up pipelines from mMedia so they may be inspected on STS
|
||||
TrackID trackId = aSelector ? aSelector->GetTrackID() : 0;
|
||||
|
||||
|
@ -248,6 +248,26 @@ function buildPcDiv(stats, pcDivHeading) {
|
||||
|
||||
// end of ICE stats
|
||||
|
||||
// Now, SDP
|
||||
var localSdpHeading = document.createElement('h4');
|
||||
localSdpHeading.appendChild(document.createTextNode("Local SDP"));
|
||||
newPcDiv.appendChild(localSdpHeading);
|
||||
|
||||
var localSdpDiv = document.createElement('pre');
|
||||
localSdpDiv.appendChild(document.createTextNode(stats.localSdp));
|
||||
|
||||
newPcDiv.appendChild(localSdpDiv);
|
||||
|
||||
var remoteSdpHeading = document.createElement('h4');
|
||||
remoteSdpHeading.appendChild(document.createTextNode("Remote SDP"));
|
||||
newPcDiv.appendChild(remoteSdpHeading);
|
||||
|
||||
var remoteSdpDiv = document.createElement('pre');
|
||||
remoteSdpDiv.appendChild(document.createTextNode(stats.remoteSdp));
|
||||
|
||||
newPcDiv.appendChild(remoteSdpDiv);
|
||||
// End of SDP
|
||||
|
||||
// Now, RTP stats
|
||||
var rtpHeading = document.createElement('h4');
|
||||
rtpHeading.appendChild(document.createTextNode("RTP statistics"));
|
||||
|
Loading…
Reference in New Issue
Block a user