Backed out 3 changesets (bug 1155923) for causing test failures in promises-call.html

Backed out changeset 321a932e01a7 (bug 1155923)
Backed out changeset 6ac38acd6ab2 (bug 1155923)
Backed out changeset 2981db92416a (bug 1155923)
This commit is contained in:
Carsten "Tomcat" Book 2015-09-28 14:02:41 +02:00
parent 750fd2f36e
commit a64c5f1b9c
65 changed files with 157 additions and 244 deletions

View File

@ -19,8 +19,7 @@
"chai": false,
"console": false,
"loop": true,
"MozActivity": false,
"RTCSessionDescription": false,
"mozRTCSessionDescription": false,
"OT": false,
"performance": false,
"Promise": false,

View File

@ -983,7 +983,7 @@ var MozLoopServiceInternal = {
}
};
let pc_static = new window.RTCPeerConnectionStatic();
let pc_static = new window.mozRTCPeerConnectionStatic();
pc_static.registerPeerConnectionLifecycleCallback(onPCLifecycleChange);
UITour.notify("Loop:ChatWindowOpened");

View File

@ -17,11 +17,11 @@ describe("Validator", function() {
function Y(){}
describe("#validate", function() {
function RTCSessionDescription() {}
var rtcsd;
function mozRTCSessionDescription() {}
var mozRTC;
beforeEach(function() {
rtcsd = new RTCSessionDescription();
mozRTC = new mozRTCSessionDescription();
});
it("should check for a single required dependency when no option passed",
@ -74,9 +74,9 @@ describe("Validator", function() {
});
it("should check for a native constructor dependency", function() {
expect(create({foo: rtcsd}, {foo: "x"}))
expect(create({foo: mozRTC}, {foo: "x"}))
.to.Throw(TypeError,
/invalid dependency: foo; expected RTCSessionDescription/);
/invalid dependency: foo; expected mozRTCSessionDescription/);
});
it("should check for a null dependency", function() {

View File

@ -41,6 +41,4 @@ DEPRECATED_OPERATION(DataContainerEvent)
DEPRECATED_OPERATION(Window_Controllers)
DEPRECATED_OPERATION(ImportXULIntoContent)
DEPRECATED_OPERATION(PannerNodeDoppler)
DEPRECATED_OPERATION(NavigatorGetUserMedia)
DEPRECATED_OPERATION(WebrtcDeprecatedPrefix)
DEPRECATED_OPERATION(AppCache)

View File

@ -3052,21 +3052,5 @@ SetDocumentAndPageUseCounter(JSContext* aCx, JSObject* aObject,
}
}
void
DeprecationWarning(JSContext* aCx, JSObject* aObject,
nsIDocument::DeprecatedOperations aOperation)
{
GlobalObject global(aCx, aObject);
if (global.Failed()) {
NS_ERROR("Could not create global for DeprecationWarning");
return;
}
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(global.GetAsSupports());
if (window && window->GetExtantDoc()) {
window->GetExtantDoc()->WarnOnceAbout(aOperation);
}
}
} // namespace dom
} // namespace mozilla

View File

@ -28,7 +28,6 @@
#include "mozilla/ErrorResult.h"
#include "mozilla/Likely.h"
#include "mozilla/MemoryReporting.h"
#include "nsIDocument.h"
#include "nsIGlobalObject.h"
#include "nsIXPConnect.h"
#include "nsJSUtils.h"
@ -3343,11 +3342,6 @@ void
SetDocumentAndPageUseCounter(JSContext* aCx, JSObject* aObject,
UseCounter aUseCounter);
// Warnings
void
DeprecationWarning(JSContext* aCx, JSObject* aObject,
nsIDocument::DeprecatedOperations aOperation);
} // namespace dom
} // namespace mozilla

View File

@ -1933,12 +1933,6 @@ DOMInterfaces = {
'TestExampleProxyInterface' : {
'headerFile': 'TestExampleProxyInterface-example.h',
'register': False
},
'TestDeprecatedInterface' : {
# Keep this in sync with TestExampleInterface
'headerFile': 'TestBindingHeader.h',
'register': False
}
}

View File

@ -6917,13 +6917,20 @@ class CGPerSignatureCall(CGThing):
}
""")))
deprecated = (idlNode.getExtendedAttribute("Deprecated") or
(static and descriptor.interface.getExtendedAttribute("Deprecated")))
if deprecated:
if idlNode.getExtendedAttribute("Deprecated"):
cgThings.append(CGGeneric(dedent(
"""
DeprecationWarning(cx, obj, nsIDocument::e%s);
""" % deprecated[0])))
{
GlobalObject global(cx, obj);
if (global.Failed()) {
return false;
}
nsCOMPtr<nsPIDOMWindow> pWindow = do_QueryInterface(global.GetAsSupports());
if (pWindow && pWindow->GetExtantDoc()) {
pWindow->GetExtantDoc()->WarnOnceAbout(nsIDocument::e%s);
}
}
""" % idlNode.getExtendedAttribute("Deprecated")[0])))
lenientFloatCode = None
if idlNode.getExtendedAttribute('LenientFloat') is not None:

View File

@ -1410,8 +1410,7 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins):
identifier == "AvailableIn" or
identifier == "Func" or
identifier == "CheckAnyPermissions" or
identifier == "CheckAllPermissions" or
identifier == "Deprecated"):
identifier == "CheckAllPermissions"):
# Known extended attributes that take a string value
if not attr.hasValue():
raise WebIDLError("[%s] must have a value" % identifier,

View File

@ -1357,20 +1357,6 @@ class TestChildInterface : public TestParentInterface
{
};
class TestDeprecatedInterface : public nsISupports, public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
static
already_AddRefed<TestDeprecatedInterface>
Constructor(const GlobalObject&, ErrorResult&);
static void AlsoDeprecated(const GlobalObject&);
virtual nsISupports* GetParentObject();
};
} // namespace dom
} // namespace mozilla

View File

@ -1156,8 +1156,3 @@ interface TestCppKeywordNamedMethodsInterface {
long volatile();
};
[Deprecated="GetAttributeNode", Constructor()]
interface TestDeprecatedInterface {
static void alsoDeprecated();
};

View File

@ -11,7 +11,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=923010
<script type="application/javascript">
/** Test for Bug 923010 **/
try {
var conn = new RTCPeerConnection();
var conn = new mozRTCPeerConnection();
try {
conn.updateIce(candidate, function() {
ok(false, "The call to updateIce succeeded when it should have thrown");
@ -26,7 +26,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=923010
"Should have the exception we expect");
}
var candidate = new RTCIceCandidate({candidate: null });
var candidate = new mozRTCIceCandidate({candidate: null });
conn.addIceCandidate(candidate)
.then(function() {

View File

@ -180,5 +180,3 @@ ClientRequestOpaqueInterception=A ServiceWorker passed an opaque Response to Fet
BadOpaqueRedirectInterception=A ServiceWorker passed an opaqueredirect Response to FetchEvent.respondWith() while FetchEvent.request was not a navigation request.
# LOCALIZATION NOTE: Do not translate "ServiceWorker" or "FetchEvent.preventDefault()".
InterceptionCanceled=ServiceWorker canceled network interception by calling FetchEvent.preventDefault().
WebrtcDeprecatedPrefixWarning=WebRTC interfaces with the "moz" prefix (mozRTCPeerConnection, mozRTCSessionDescription, mozRTCIceCandidate) have been deprecated.
NavigatorGetUserMediaWarning=navigator.mozGetUserMedia has been replaced by navigator.mediaDevices.getUserMedia

View File

@ -233,7 +233,7 @@ function RTCIceCandidate() {
this.candidate = this.sdpMid = this.sdpMLineIndex = null;
}
RTCIceCandidate.prototype = {
classDescription: "RTCIceCandidate",
classDescription: "mozRTCIceCandidate",
classID: PC_ICE_CID,
contractID: PC_ICE_CONTRACT,
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
@ -252,7 +252,7 @@ function RTCSessionDescription() {
this.type = this.sdp = null;
}
RTCSessionDescription.prototype = {
classDescription: "RTCSessionDescription",
classDescription: "mozRTCSessionDescription",
classID: PC_SESSION_CID,
contractID: PC_SESSION_CONTRACT,
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
@ -346,7 +346,7 @@ function RTCPeerConnection() {
this._iceGatheringState = this._iceConnectionState = "new";
}
RTCPeerConnection.prototype = {
classDescription: "RTCPeerConnection",
classDescription: "mozRTCPeerConnection",
classID: PC_CID,
contractID: PC_CONTRACT,
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
@ -458,7 +458,7 @@ RTCPeerConnection.prototype = {
}
certPromise = Promise.resolve(cert);
} else {
certPromise = this._win.RTCPeerConnection.generateCertificate({
certPromise = this._win.mozRTCPeerConnection.generateCertificate({
name: "ECDSA", namedCurve: "P-256"
});
}
@ -733,7 +733,7 @@ RTCPeerConnection.prototype = {
}));
p = this._addIdentityAssertion(p, origin);
return p.then(
sdp => new this._win.RTCSessionDescription({ type: "offer", sdp: sdp }));
sdp => new this._win.mozRTCSessionDescription({ type: "offer", sdp: sdp }));
});
});
},
@ -768,7 +768,7 @@ RTCPeerConnection.prototype = {
}));
p = this._addIdentityAssertion(p, origin);
return p.then(sdp => {
return new this._win.RTCSessionDescription({ type: "answer", sdp: sdp });
return new this._win.mozRTCSessionDescription({ type: "answer", sdp: sdp });
});
});
});
@ -1069,7 +1069,7 @@ RTCPeerConnection.prototype = {
}
sdp = this._localIdp.addIdentityAttribute(sdp);
return new this._win.RTCSessionDescription({ type: this._localType,
return new this._win.mozRTCSessionDescription({ type: this._localType,
sdp: sdp });
},
@ -1079,7 +1079,7 @@ RTCPeerConnection.prototype = {
if (sdp.length == 0) {
return null;
}
return new this._win.RTCSessionDescription({ type: this._remoteType,
return new this._win.mozRTCSessionDescription({ type: this._remoteType,
sdp: sdp });
},
@ -1268,7 +1268,7 @@ PeerConnectionObserver.prototype = {
if (candidate == "") {
this.foundIceCandidate(null);
} else {
this.foundIceCandidate(new this._dompc._win.RTCIceCandidate(
this.foundIceCandidate(new this._dompc._win.mozRTCIceCandidate(
{
candidate: candidate,
sdpMid: mid,
@ -1447,7 +1447,7 @@ PeerConnectionObserver.prototype = {
function RTCPeerConnectionStatic() {
}
RTCPeerConnectionStatic.prototype = {
classDescription: "RTCPeerConnectionStatic",
classDescription: "mozRTCPeerConnectionStatic",
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
Ci.nsIDOMGlobalPropertyInitializer]),

View File

@ -7,7 +7,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=791270
<meta charset="utf-8">
<title>Simple PeerConnection Video Test</title>
<script type="application/javascript">
var pc = new RTCPeerConnection();
var pc = new mozRTCPeerConnection();
pc.addStream(undefined);
</script>
</head>

View File

@ -7,10 +7,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=791278
<meta charset="utf-8">
<title>Simple PeerConnection Video Test - Invalid callback</title>
<script type="application/javascript">
var pc1 = new RTCPeerConnection();
var pc1 = new mozRTCPeerConnection();
pc1.setLocalDescription(function() {});
var pc2 = new RTCPeerConnection();
var pc2 = new mozRTCPeerConnection();
pc2.setRemoteDescription(function() {});
</script>
</head>

View File

@ -12,7 +12,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=791330
}
function runTest() {
var pc = new RTCPeerConnection();
var pc = new mozRTCPeerConnection();
pc.close();
navigator.mozGetUserMedia({audio: true, fake: true}, function (stream) {

View File

@ -12,8 +12,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=799419
}
function boom() {
var v0 = new RTCPeerConnection();
var v1 = new RTCPeerConnection();
var v0 = new mozRTCPeerConnection();
var v1 = new mozRTCPeerConnection();
var v2 = document.getElementById("pc1video");
var v3 = document.getElementById("pc2video");
navigator.mozGetUserMedia({video:true, fake: true},

View File

@ -7,7 +7,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=801227
<meta charset="utf-8">
<title>Abort due to page reload</title>
<script type="application/javascript">
var pc = new RTCPeerConnection();
var pc = new mozRTCPeerConnection();
var index = localStorage.index || 0;
if (index < 3) {

View File

@ -33,8 +33,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=812785
var stream = localAudio.mozCaptureStreamUntilEnded();
pc1 = new RTCPeerConnection();
pc2 = new RTCPeerConnection();
pc1 = new mozRTCPeerConnection();
pc2 = new mozRTCPeerConnection();
pc1.addStream(stream);
pc1.createOffer(function (offer) {

View File

@ -15,7 +15,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=822197
function start() {
for(var i = 0; i < 70; i++) {
var pc = new RTCPeerConnection();
var pc = new mozRTCPeerConnection();
pc.createOffer(function() {}, function() {});
pcArray.push(pc);
}

View File

@ -3,8 +3,8 @@
<script language="javascript">
function start() {
remotePC = new RTCPeerConnection();
var cand = new RTCIceCandidate(
remotePC = new mozRTCPeerConnection();
var cand = new mozRTCIceCandidate(
{candidate: "1 1 UDP 1 127.0.0.1 34567 type host",
sdpMid: "helloworld",
sdbMid: "helloworld", // Mis-spelt attribute for bug 833948 compatibility.

View File

@ -9,7 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=836349
<script type="application/javascript">
function crash()
{
var pc = new RTCPeerConnection();
var pc = new mozRTCPeerConnection();
var ld = pc.localDescription;
dump(ld.sdp);
}

View File

@ -12,8 +12,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=837324
}
function start() {
var o0 = new RTCPeerConnection();
var o1 = new RTCIceCandidate({"candidate":"0 -65535 IP 0 stun.sipgate.net 3227326073 type ::ffff:192.0.2.128 host 2302600701","sdpMid":"video 3907077665 RTP/SAVPF 5000","sdpMLineIndex":7});
var o0 = new mozRTCPeerConnection();
var o1 = new mozRTCIceCandidate({"candidate":"0 -65535 IP 0 stun.sipgate.net 3227326073 type ::ffff:192.0.2.128 host 2302600701","sdpMid":"video 3907077665 RTP/SAVPF 5000","sdpMLineIndex":7});
try {o0.addIceCandidate(o1);} catch(e) {} // bug 842075 - remove try when fixed
finish();

View File

@ -49,8 +49,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=855796
}
function start() {
pc1 = new RTCPeerConnection();
pc2 = new RTCPeerConnection();
pc1 = new mozRTCPeerConnection();
pc2 = new mozRTCPeerConnection();
navigator.mozGetUserMedia({audio:true, video:true, fake:true}, function(s) {
pc1.addStream(s);
navigator.mozGetUserMedia({audio:true, video:true, fake:true}, function(s) {

View File

@ -8,7 +8,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=860143
<title>bug 860143</title>
<script type="application/javascript">
function start() {
var o0 = new window.RTCPeerConnection({
var o0 = new window.mozRTCPeerConnection({
iceServers: [
{
url: "turn:AAAAAAAAAAAAAAAAA AAAAAAAAAAA AAAAAAAAAAAAA AA AAAAA AAAAAAAAAAA AAAAAAAAAAAAAAAA AAAAA AAAAAAAAAA, AAAAAAAAAAAAAAAA AAA AAAAAAAAAAAAAAA"

View File

@ -8,7 +8,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=861958
<title>bug 861958</title>
<script type="application/javascript">
function start() {
var o0 = new window.RTCPeerConnection();
var o0 = new window.mozRTCPeerConnection();
var o1 = o0.createDataChannel("foo", {
"protocol": "text/char",
"preset": false,

View File

@ -49,8 +49,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=863929
}
function start() {
pc1 = new RTCPeerConnection();
pc2 = new RTCPeerConnection();
pc1 = new mozRTCPeerConnection();
pc2 = new mozRTCPeerConnection();
navigator.mozGetUserMedia({audio:true, video:true, fake:true}, function(s) {
pc1.addStream(s);
navigator.mozGetUserMedia({audio:true, video:true, fake:true}, function(s) {

View File

@ -51,9 +51,9 @@ function fingerprintSdp(fingerprints) {
// This function synthesizes that SDP and tries to set it.
function testMultipleFingerprints() {
// this one fails setRemoteDescription if the identity is not good
var pcStrict = new RTCPeerConnection({ peerIdentity: 'someone@example.com'});
var pcStrict = new mozRTCPeerConnection({ peerIdentity: 'someone@example.com'});
// this one will be manually tweaked to have two fingerprints
var pcDouble = new RTCPeerConnection({});
var pcDouble = new mozRTCPeerConnection({});
var offer, match, fingerprints;
@ -86,7 +86,7 @@ function testMultipleFingerprints() {
fingerprintSdp(fingerprints.slice(1)) +
offer.sdp.slice(match.index);
var desc = new RTCSessionDescription({ type: 'offer', sdp: sdp });
var desc = new mozRTCSessionDescription({ type: 'offer', sdp: sdp });
return pcStrict.setRemoteDescription(desc);
})
.then(() => {

View File

@ -271,7 +271,7 @@ PeerConnectionTest.prototype.createDataChannel = function(options) {
PeerConnectionTest.prototype.createAnswer = function(peer) {
return peer.createAnswer().then(answer => {
// make a copy so this does not get updated with ICE candidates
this.originalAnswer = new RTCSessionDescription(JSON.parse(JSON.stringify(answer)));
this.originalAnswer = new mozRTCSessionDescription(JSON.parse(JSON.stringify(answer)));
return answer;
});
};
@ -286,7 +286,7 @@ PeerConnectionTest.prototype.createAnswer = function(peer) {
PeerConnectionTest.prototype.createOffer = function(peer) {
return peer.createOffer().then(offer => {
// make a copy so this does not get updated with ICE candidates
this.originalOffer = new RTCSessionDescription(JSON.parse(JSON.stringify(offer)));
this.originalOffer = new mozRTCSessionDescription(JSON.parse(JSON.stringify(offer)));
return offer;
});
};
@ -297,7 +297,7 @@ PeerConnectionTest.prototype.createOffer = function(peer) {
*
* @param {PeerConnectionWrapper} peer
The peer connection wrapper to run the command on
* @param {RTCSessionDescription} desc
* @param {mozRTCSessionDescription} desc
* Session description for the local description request
*/
PeerConnectionTest.prototype.setLocalDescription =
@ -366,7 +366,7 @@ PeerConnectionTest.prototype.setOfferOptions = function(options) {
*
* @param {PeerConnectionWrapper} peer
The peer connection wrapper to run the command on
* @param {RTCSessionDescription} desc
* @param {mozRTCSessionDescription} desc
* Session description for the remote description request
*/
PeerConnectionTest.prototype.setRemoteDescription =
@ -709,7 +709,7 @@ function PeerConnectionWrapper(label, configuration) {
this.iceCheckingRestartExpected = false;
info("Creating " + this);
this._pc = new RTCPeerConnection(this.configuration);
this._pc = new mozRTCPeerConnection(this.configuration);
/**
* Setup callback handlers
@ -963,7 +963,7 @@ PeerConnectionWrapper.prototype = {
* Sets the local description and automatically handles the failure case.
*
* @param {object} desc
* RTCSessionDescription for the local description request
* mozRTCSessionDescription for the local description request
*/
setLocalDescription : function(desc) {
this.observedNegotiationNeeded = undefined;
@ -977,7 +977,7 @@ PeerConnectionWrapper.prototype = {
* causes the test case to fail if the call succeeds.
*
* @param {object} desc
* RTCSessionDescription for the local description request
* mozRTCSessionDescription for the local description request
* @returns {Promise}
* A promise that resolves to the expected error
*/
@ -994,7 +994,7 @@ PeerConnectionWrapper.prototype = {
* Sets the remote description and automatically handles the failure case.
*
* @param {object} desc
* RTCSessionDescription for the remote description request
* mozRTCSessionDescription for the remote description request
*/
setRemoteDescription : function(desc) {
this.observedNegotiationNeeded = undefined;
@ -1014,7 +1014,7 @@ PeerConnectionWrapper.prototype = {
* causes the test case to fail if the call succeeds.
*
* @param {object} desc
* RTCSessionDescription for the remote description request
* mozRTCSessionDescription for the remote description request
* @returns {Promise}
* a promise that resolve to the returned error
*/
@ -1115,7 +1115,7 @@ PeerConnectionWrapper.prototype = {
* later, depending on the state of the PeerConnection.
*
* @param {object} candidate
* The RTCIceCandidate to be added or stored
* The mozRTCIceCandidate to be added or stored
*/
storeOrAddIceCandidate : function(candidate) {
this._remote_ice_candidates.push(candidate);

View File

@ -141,7 +141,7 @@ var commandsPeerConnectionInitial = [
test.setupSignalingClient();
test.registerSignalingCallback("ice_candidate", function (message) {
var pc = test.pcRemote ? test.pcRemote : test.pcLocal;
pc.storeOrAddIceCandidate(new RTCIceCandidate(message.ice_candidate));
pc.storeOrAddIceCandidate(new mozRTCIceCandidate(message.ice_candidate));
});
test.registerSignalingCallback("end_of_trickle_ice", function (message) {
test.signalingMessagesFinished();
@ -291,7 +291,7 @@ var commandsPeerConnectionOfferAnswer = [
return test.getSignalingMessage("offer")
.then(message => {
ok("offer" in message, "Got an offer message");
test._local_offer = new RTCSessionDescription(message.offer);
test._local_offer = new mozRTCSessionDescription(message.offer);
test._offer_constraints = message.offer_constraints;
test._offer_options = message.offer_options;
});
@ -351,7 +351,7 @@ var commandsPeerConnectionOfferAnswer = [
return test.getSignalingMessage("answer").then(message => {
ok("answer" in message, "Got an answer message");
test._remote_answer = new RTCSessionDescription(message.answer);
test._remote_answer = new mozRTCSessionDescription(message.answer);
test._answer_constraints = message.answer_constraints;
});
},

View File

@ -12,7 +12,7 @@
});
runNetworkTest(function () {
var pc = new RTCPeerConnection();
var pc = new mozRTCPeerConnection();
// necessary to circumvent bug 864109
var options = { offerToReceiveAudio: true };

View File

@ -19,7 +19,7 @@
test.chain.insertAfter("PC_LOCAL_SET_LOCAL_DESCRIPTION", [
function PC_LOCAL_ADD_CANDIDATE_EARLY(test) {
var candidate = new RTCIceCandidate(
var candidate = new mozRTCIceCandidate(
{candidate:"candidate:1 1 UDP 2130706431 192.168.2.1 50005 typ host",
sdpMLineIndex: 0});
return test.pcLocal._pc.addIceCandidate(candidate).then(
@ -31,7 +31,7 @@
]);
test.chain.insertAfter("PC_REMOTE_SET_LOCAL_DESCRIPTION", [
function PC_REMOTE_ADD_CANDIDATE_INVALID_INDEX(test) {
var invalid_index = new RTCIceCandidate(
var invalid_index = new mozRTCIceCandidate(
{candidate:"candidate:1 1 UDP 2130706431 192.168.2.1 50005 typ host",
sdpMLineIndex: 2});
return test.pcRemote._pc.addIceCandidate(invalid_index)
@ -43,7 +43,7 @@
);
},
function PC_REMOTE_ADD_BOGUS_CANDIDATE(test) {
var bogus = new RTCIceCandidate(
var bogus = new mozRTCIceCandidate(
{candidate:"Pony Lords, jump!",
sdpMLineIndex: 0});
return test.pcRemote._pc.addIceCandidate(bogus)
@ -57,7 +57,7 @@
function PC_REMOTE_ADD_CANDIDATE_MISSING_INDEX(test) {
// Note: it is probably not a good idea to automatically fill a missing
// MLineIndex with a default value of zero, see bug 1157034
var broken = new RTCIceCandidate(
var broken = new mozRTCIceCandidate(
{candidate:"candidate:1 1 UDP 2130706431 192.168.2.1 50005 typ host"});
return test.pcRemote._pc.addIceCandidate(broken)
.then(
@ -66,7 +66,7 @@
);
},
function PC_REMOTE_ADD_VALID_CANDIDATE(test) {
var candidate = new RTCIceCandidate(
var candidate = new mozRTCIceCandidate(
{candidate:"candidate:1 1 UDP 2130706431 192.168.2.1 50005 typ host",
sdpMLineIndex: 0});
return test.pcRemote._pc.addIceCandidate(candidate)

View File

@ -8,11 +8,11 @@
<script type="application/javascript">
createHTML({
bug: "822674",
title: "RTCPeerConnection isn't a true javascript object as it should be"
title: "mozRTCPeerConnection isn't a true javascript object as it should be"
});
runNetworkTest(function () {
var pc = new RTCPeerConnection();
var pc = new mozRTCPeerConnection();
pc.thereIsNeverGoingToBeAPropertyWithThisNameOnThisInterface = 1;
is(pc.thereIsNeverGoingToBeAPropertyWithThisNameOnThisInterface, 1,

View File

@ -14,12 +14,12 @@
var makePC = (config, expected_error) => {
var exception;
try {
new RTCPeerConnection(config).close();
new mozRTCPeerConnection(config).close();
} catch (e) {
exception = e;
}
is((exception? exception.name : "success"), expected_error || "success",
"RTCPeerConnection(" + JSON.stringify(config) + ")");
"mozRTCPeerConnection(" + JSON.stringify(config) + ")");
};
// This is a test of the iceServers parsing code + readable errors
@ -27,11 +27,11 @@ runNetworkTest(() => {
var exception = null;
try {
new RTCPeerConnection().close();
new mozRTCPeerConnection().close();
} catch (e) {
exception = e;
}
ok(!exception, "RTCPeerConnection() succeeds");
ok(!exception, "mozRTCPeerConnection() succeeds");
exception = null;
makePC();
@ -66,14 +66,14 @@ runNetworkTest(() => {
makePC({ iceServers: [{ urls:"http:0.0.0.0" }] }, "SyntaxError");
try {
new RTCPeerConnection({ iceServers: [{ url:"http:0.0.0.0" }] }).close();
new mozRTCPeerConnection({ iceServers: [{ url:"http:0.0.0.0" }] }).close();
} catch (e) {
ok(e.message.indexOf("http") > 0,
"RTCPeerConnection() constructor has readable exceptions");
"mozRTCPeerConnection() constructor has readable exceptions");
}
// Below tests are setting the about:config User preferences for default
// ice servers and checking the outputs when RTCPeerConnection() is
// ice servers and checking the outputs when mozRTCPeerConnection() is
// invoked. See Bug 1167922 for more information.
// Note - We use promises here since the SpecialPowers API will be
// performed asynchronously.

View File

@ -12,8 +12,8 @@
});
runNetworkTest(function () {
var pc1 = new RTCPeerConnection();
var pc2 = new RTCPeerConnection();
var pc1 = new mozRTCPeerConnection();
var pc2 = new mozRTCPeerConnection();
pc1.createOffer({ offerToReceiveAudio: true }).then(offer => {
// The whole point of this test is not to wait for the

View File

@ -27,8 +27,8 @@ function pcall(o, f, beforeArg) {
});
}
var pc1 = new RTCPeerConnection();
var pc2 = new RTCPeerConnection();
var pc1 = new mozRTCPeerConnection();
var pc2 = new mozRTCPeerConnection();
var pc2_haveRemoteOffer = new Promise(resolve => {
pc2.onsignalingstatechange =

View File

@ -12,7 +12,7 @@
});
function badCertificate(config, expectedError, message) {
return RTCPeerConnection.generateCertificate(config)
return mozRTCPeerConnection.generateCertificate(config)
.then(() => ok(false, message),
e => is(e.name, expectedError, message));
}
@ -94,7 +94,7 @@
runNetworkTest(function (options) {
var expiredCert;
return Promise.resolve()
.then(() => RTCPeerConnection.generateCertificate({
.then(() => mozRTCPeerConnection.generateCertificate({
name: "ECDSA",
namedCurve: "P-256",
expires: 1 // smallest possible expiration window
@ -117,7 +117,7 @@
.then(() => {
ok(expiredCert.expires <= Date.now(), 'Cert should be at or past expiration');
try {
new RTCPeerConnection({ certificates: [expiredCert] });
new mozRTCPeerConnection({ certificates: [expiredCert] });
ok(false, 'Constructing peer connection with an expired cert is not allowed');
} catch(e) {
is(e.name, 'InvalidParameterError',
@ -126,11 +126,11 @@
})
.then(() => Promise.all([
RTCPeerConnection.generateCertificate({
mozRTCPeerConnection.generateCertificate({
name: "ECDSA",
namedCurve: "P-256"
}),
RTCPeerConnection.generateCertificate({
mozRTCPeerConnection.generateCertificate({
name: "RSASSA-PKCS1-v1_5",
hash: "SHA-256",
modulusLength: 2048,
@ -142,7 +142,7 @@
.then(storeAndRetrieve)
.then(certs => {
try {
new RTCPeerConnection({ certificates: certs });
new mozRTCPeerConnection({ certificates: certs });
ok(false, 'Constructing peer connection with multiple certs is not allowed');
} catch(e) {
is(e.name, 'NotSupportedError',

View File

@ -12,7 +12,7 @@
});
runNetworkTest(function () {
var pc = new RTCPeerConnection();
var pc = new mozRTCPeerConnection();
var exception = null;
var eTimeout = null;
@ -57,9 +57,9 @@
// These legacy methods fire the error callback instead. This is not
// entirely to spec but is better than ignoring programming errors.
var offer = new RTCSessionDescription({ sdp: "sdp", type: "offer" });
var answer = new RTCSessionDescription({ sdp: "sdp", type: "answer" });
var candidate = new RTCIceCandidate({ candidate: "dummy",
var offer = new mozRTCSessionDescription({ sdp: "sdp", type: "offer" });
var answer = new mozRTCSessionDescription({ sdp: "sdp", type: "answer" });
var candidate = new mozRTCIceCandidate({ candidate: "dummy",
sdpMid: "test",
sdpMLineIndex: 3 });

View File

@ -21,12 +21,12 @@ function PC_REMOTE_SETUP_NULL_ICE_HANDLER(test) {
test.pcRemote.setupIceCandidateHandler(test, function() {}, function () {});
}
function PC_REMOTE_ADD_FAKE_ICE_CANDIDATE(test) {
var cand = new RTCIceCandidate({"candidate":"candidate:0 1 UDP 2130379007 192.0.2.1 12345 typ host","sdpMid":"","sdpMLineIndex":0});
var cand = new mozRTCIceCandidate({"candidate":"candidate:0 1 UDP 2130379007 192.0.2.1 12345 typ host","sdpMid":"","sdpMLineIndex":0});
test.pcRemote.storeOrAddIceCandidate(cand);
info(test.pcRemote + " Stored fake candidate: " + JSON.stringify(cand));
}
function PC_LOCAL_ADD_FAKE_ICE_CANDIDATE(test) {
var cand = new RTCIceCandidate({"candidate":"candidate:0 1 UDP 2130379007 192.0.2.2 56789 typ host","sdpMid":"","sdpMLineIndex":0});
var cand = new mozRTCIceCandidate({"candidate":"candidate:0 1 UDP 2130379007 192.0.2.2 56789 typ host","sdpMid":"","sdpMLineIndex":0});
test.pcLocal.storeOrAddIceCandidate(cand);
info(test.pcLocal + " Stored fake candidate: " + JSON.stringify(cand));
}

View File

@ -17,7 +17,7 @@
};
function testCreateAnswerError() {
var pc = new RTCPeerConnection();
var pc = new mozRTCPeerConnection();
info ("Testing createAnswer error");
return pc.createAnswer()
.then(generateErrorCallback("createAnswer before offer should fail"),
@ -25,18 +25,18 @@
};
function testSetLocalDescriptionError() {
var pc = new RTCPeerConnection();
var pc = new mozRTCPeerConnection();
info ("Testing setLocalDescription error");
return pc.setLocalDescription(new RTCSessionDescription({ sdp: "Picklechips!",
return pc.setLocalDescription(new mozRTCSessionDescription({ sdp: "Picklechips!",
type: "offer" }))
.then(generateErrorCallback("setLocalDescription with nonsense SDP should fail"),
validateReason);
};
function testSetRemoteDescriptionError() {
var pc = new RTCPeerConnection();
var pc = new mozRTCPeerConnection();
info ("Testing setRemoteDescription error");
return pc.setRemoteDescription(new RTCSessionDescription({ sdp: "Who?",
return pc.setRemoteDescription(new mozRTCSessionDescription({ sdp: "Who?",
type: "offer" }))
.then(generateErrorCallback("setRemoteDescription with nonsense SDP should fail"),
validateReason);

View File

@ -20,12 +20,12 @@ function PC_REMOTE_SETUP_NULL_ICE_HANDLER(test) {
test.pcRemote.setupIceCandidateHandler(test, function() {}, function () {});
}
function PC_REMOTE_ADD_FAKE_ICE_CANDIDATE(test) {
var cand = new RTCIceCandidate({"candidate":"candidate:0 1 UDP 2130379007 192.0.2.1 12345 typ host","sdpMid":"","sdpMLineIndex":0});
var cand = new mozRTCIceCandidate({"candidate":"candidate:0 1 UDP 2130379007 192.0.2.1 12345 typ host","sdpMid":"","sdpMLineIndex":0});
test.pcRemote.storeOrAddIceCandidate(cand);
info(test.pcRemote + " Stored fake candidate: " + JSON.stringify(cand));
}
function PC_LOCAL_ADD_FAKE_ICE_CANDIDATE(test) {
var cand = new RTCIceCandidate({"candidate":"candidate:0 1 UDP 2130379007 192.0.2.2 56789 typ host","sdpMid":"","sdpMLineIndex":0});
var cand = new mozRTCIceCandidate({"candidate":"candidate:0 1 UDP 2130379007 192.0.2.2 56789 typ host","sdpMid":"","sdpMLineIndex":0});
test.pcLocal.storeOrAddIceCandidate(cand);
info(test.pcLocal + " Stored fake candidate: " + JSON.stringify(cand));
}

View File

@ -39,7 +39,7 @@
function PC_REMOTE_ROLLBACK(test) {
return test.setLocalDescription(
test.pcRemote,
new RTCSessionDescription({ type: "rollback", sdp: ""}),
new mozRTCSessionDescription({ type: "rollback", sdp: ""}),
STABLE);
},

View File

@ -25,7 +25,7 @@
function PC_REMOTE_ROLLBACK(test) {
return test.setLocalDescription(
test.pcRemote,
new RTCSessionDescription({ type: "rollback", sdp: ""}),
new mozRTCSessionDescription({ type: "rollback", sdp: ""}),
STABLE);
},

View File

@ -12,8 +12,8 @@
visible: true
});
var pc1 = new RTCPeerConnection();
var pc2 = new RTCPeerConnection();
var pc1 = new mozRTCPeerConnection();
var pc2 = new mozRTCPeerConnection();
var pc2_haveRemoteOffer = new Promise(resolve => pc2.onsignalingstatechange =
e => (e.target.signalingState == "have-remote-offer") && resolve());

View File

@ -37,14 +37,14 @@
function PC_REMOTE_ROLLBACK(test) {
return test.setRemoteDescription(
test.pcRemote,
new RTCSessionDescription({ type: "rollback" }),
new mozRTCSessionDescription({ type: "rollback" }),
STABLE);
},
function PC_LOCAL_ROLLBACK(test) {
return test.setLocalDescription(
test.pcLocal,
new RTCSessionDescription({ type: "rollback", sdp: ""}),
new mozRTCSessionDescription({ type: "rollback", sdp: ""}),
STABLE);
},

View File

@ -20,14 +20,14 @@
function PC_REMOTE_ROLLBACK(test) {
return test.setRemoteDescription(
test.pcRemote,
new RTCSessionDescription({ type: "rollback" }),
new mozRTCSessionDescription({ type: "rollback" }),
STABLE);
},
function PC_LOCAL_ROLLBACK(test) {
return test.setLocalDescription(
test.pcLocal,
new RTCSessionDescription({ type: "rollback", sdp: ""}),
new mozRTCSessionDescription({ type: "rollback", sdp: ""}),
STABLE);
},

View File

@ -42,10 +42,10 @@ runNetworkTest(function () {
let pc0, pc1, pc2;
// Test failure callbacks (limited to 1 for now)
pc0 = new RTCPeerConnection();
pc0 = new mozRTCPeerConnection();
pc0.createOffer(getFail(), function(err) {
pc1 = new RTCPeerConnection();
pc2 = new RTCPeerConnection();
pc1 = new mozRTCPeerConnection();
pc2 = new mozRTCPeerConnection();
// Test success callbacks (happy path)
navigator.mozGetUserMedia({video:true, fake: true}, function(video1) {

View File

@ -8,13 +8,13 @@
<script type="application/javascript">
createHTML({
bug: "928304",
title: "test toJSON() on RTCSessionDescription and RTCIceCandidate"
title: "test toJSON() on mozRTCSessionDescription and mozRTCIceCandidate"
});
runNetworkTest(function () {
/** Test for Bug 872377 **/
var rtcSession = new RTCSessionDescription({ sdp: "Picklechips!",
var rtcSession = new mozRTCSessionDescription({ sdp: "Picklechips!",
type: "offer" });
var jsonCopy = JSON.parse(JSON.stringify(rtcSession));
for (key in rtcSession) {
@ -24,7 +24,7 @@
/** Test for Bug 928304 **/
var rtcIceCandidate = new RTCIceCandidate({ candidate: "dummy",
var rtcIceCandidate = new mozRTCIceCandidate({ candidate: "dummy",
sdpMid: "test",
sdpMLineIndex: 3 });
jsonCopy = JSON.parse(JSON.stringify(rtcIceCandidate));

View File

@ -974,18 +974,12 @@ var interfaceNamesInGlobalScope =
"RTCCertificate",
// IMPORTANT: Do not change this list without review from a DOM peer!
"RTCDataChannelEvent",
// IMPORTANT: Do not change this list without review from a DOM peer!
"RTCIceCandidate",
// IMPORTANT: Do not change this list without review from a DOM peer!
"RTCPeerConnection",
// IMPORTANT: Do not change this list without review from a DOM peer!
"RTCPeerConnectionIceEvent",
// IMPORTANT: Do not change this list without review from a DOM peer!
"RTCRtpReceiver",
// IMPORTANT: Do not change this list without review from a DOM peer!
"RTCRtpSender",
// IMPORTANT: Do not change this list without review from a DOM peer!
"RTCSessionDescription",
// IMPORTANT: Do not change this list without review from a DOM peer!
"RTCStatsReport",
// IMPORTANT: Do not change this list without review from a DOM peer!

View File

@ -389,8 +389,7 @@ partial interface Navigator {
readonly attribute MediaDevices mediaDevices;
// Deprecated. Use mediaDevices.getUserMedia instead.
[Deprecated="NavigatorGetUserMedia", Throws,
Func="Navigator::HasUserMediaSupport", UnsafeInPrerendering]
[Throws, Func="Navigator::HasUserMediaSupport", UnsafeInPrerendering]
void mozGetUserMedia(MediaStreamConstraints constraints,
NavigatorUserMediaSuccessCallback successCallback,
NavigatorUserMediaErrorCallback errorCallback);

View File

@ -5,7 +5,7 @@
*
* PeerConnection.js' interface to the C++ PeerConnectionImpl.
*
* Do not confuse with RTCPeerConnection. This interface is purely for
* Do not confuse with mozRTCPeerConnection. This interface is purely for
* communication between the PeerConnection JS DOM binding and the C++
* implementation in SIPCC.
*

View File

@ -8,7 +8,7 @@ interface nsISupports;
[ChromeOnly,
JSImplementation="@mozilla.org/dom/peerconnectionobserver;1",
Constructor (RTCPeerConnection domPC)]
Constructor (mozRTCPeerConnection domPC)]
interface PeerConnectionObserver
{
/* JSEP callbacks */

View File

@ -16,7 +16,7 @@ dictionary RTCIceCandidateInit {
[Pref="media.peerconnection.enabled",
JSImplementation="@mozilla.org/dom/rtcicecandidate;1",
Constructor(optional RTCIceCandidateInit candidateInitDict)]
interface RTCIceCandidate {
interface mozRTCIceCandidate {
attribute DOMString? candidate;
attribute DOMString? sdpMid;
attribute unsigned short? sdpMLineIndex;

View File

@ -7,7 +7,7 @@
* http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCPeerConnection
*/
callback RTCSessionDescriptionCallback = void (RTCSessionDescription sdp);
callback RTCSessionDescriptionCallback = void (mozRTCSessionDescription sdp);
callback RTCPeerConnectionErrorCallback = void (DOMError error);
callback VoidFunction = void ();
callback RTCStatsCallback = void (RTCStatsReport report);
@ -62,9 +62,6 @@ dictionary RTCAnswerOptions : RTCOfferAnswerOptions {
dictionary RTCOfferOptions : RTCOfferAnswerOptions {
long offerToReceiveVideo;
long offerToReceiveAudio;
// boolean iceRestart = false; // Not implemented (Bug 906986)
// Mozilla proprietary options (at risk: Bug 1196974)
boolean mozDontOfferDataChannel;
boolean mozBundleOnly;
@ -86,7 +83,8 @@ interface RTCDataChannel;
JSImplementation="@mozilla.org/dom/peerconnection;1",
Constructor (optional RTCConfiguration configuration,
optional object? constraints)]
interface RTCPeerConnection : EventTarget {
// moz-prefixed until sufficiently standardized.
interface mozRTCPeerConnection : EventTarget {
[Throws, StaticClassOverride="mozilla::dom::RTCCertificate"]
static Promise<RTCCertificate> generateCertificate (AlgorithmIdentifier keygenAlgorithm);
@ -96,15 +94,15 @@ interface RTCPeerConnection : EventTarget {
optional DOMString username);
[Pref="media.peerconnection.identity.enabled"]
Promise<DOMString> getIdentityAssertion();
Promise<RTCSessionDescription> createOffer (optional RTCOfferOptions options);
Promise<RTCSessionDescription> createAnswer (optional RTCAnswerOptions options);
Promise<void> setLocalDescription (RTCSessionDescription description);
Promise<void> setRemoteDescription (RTCSessionDescription description);
readonly attribute RTCSessionDescription? localDescription;
readonly attribute RTCSessionDescription? remoteDescription;
Promise<mozRTCSessionDescription> createOffer (optional RTCOfferOptions options);
Promise<mozRTCSessionDescription> createAnswer (optional RTCAnswerOptions options);
Promise<void> setLocalDescription (mozRTCSessionDescription description);
Promise<void> setRemoteDescription (mozRTCSessionDescription description);
readonly attribute mozRTCSessionDescription? localDescription;
readonly attribute mozRTCSessionDescription? remoteDescription;
readonly attribute RTCSignalingState signalingState;
void updateIce (optional RTCConfiguration configuration);
Promise<void> addIceCandidate (RTCIceCandidate candidate);
Promise<void> addIceCandidate (mozRTCIceCandidate candidate);
readonly attribute RTCIceGatheringState iceGatheringState;
readonly attribute RTCIceConnectionState iceConnectionState;
[Pref="media.peerconnection.identity.enabled"]
@ -156,7 +154,7 @@ interface RTCPeerConnection : EventTarget {
// Legacy callback API
partial interface RTCPeerConnection {
partial interface mozRTCPeerConnection {
// Dummy Promise<void> return values avoid "WebIDL.WebIDLError: error:
// We have overloads with both Promise and non-Promise return types"
@ -166,13 +164,13 @@ partial interface RTCPeerConnection {
optional RTCOfferOptions options);
Promise<void> createAnswer (RTCSessionDescriptionCallback successCallback,
RTCPeerConnectionErrorCallback failureCallback);
Promise<void> setLocalDescription (RTCSessionDescription description,
Promise<void> setLocalDescription (mozRTCSessionDescription description,
VoidFunction successCallback,
RTCPeerConnectionErrorCallback failureCallback);
Promise<void> setRemoteDescription (RTCSessionDescription description,
Promise<void> setRemoteDescription (mozRTCSessionDescription description,
VoidFunction successCallback,
RTCPeerConnectionErrorCallback failureCallback);
Promise<void> addIceCandidate (RTCIceCandidate candidate,
Promise<void> addIceCandidate (mozRTCIceCandidate candidate,
VoidFunction successCallback,
RTCPeerConnectionErrorCallback failureCallback);
Promise<void> getStats (MediaStreamTrack? selector,

View File

@ -8,12 +8,12 @@
*/
dictionary RTCPeerConnectionIceEventInit : EventInit {
RTCIceCandidate? candidate = null;
mozRTCIceCandidate? candidate = null;
};
[Pref="media.peerconnection.enabled",
Constructor(DOMString type,
optional RTCPeerConnectionIceEventInit eventInitDict)]
interface RTCPeerConnectionIceEvent : Event {
readonly attribute RTCIceCandidate? candidate;
readonly attribute mozRTCIceCandidate? candidate;
};

View File

@ -8,7 +8,7 @@
Right now, it is not possible to add static functions to a JS implemented
interface (see bug 863952), so we need to create a simple interface with a
trivial constructor and no data to hold these functions that really ought to
be static in RTCPeerConnection.
be static in mozRTCPeerConnection.
TODO(bcampen@mozilla.com) Merge this code into RTCPeerConnection once this
limitation is gone. (Bug 1017082)
*/
@ -19,7 +19,7 @@ enum RTCLifecycleEvent {
"iceconnectionstatechange"
};
callback PeerConnectionLifecycleCallback = void (RTCPeerConnection pc,
callback PeerConnectionLifecycleCallback = void (mozRTCPeerConnection pc,
unsigned long long windowId,
RTCLifecycleEvent eventType);
@ -27,7 +27,7 @@ callback PeerConnectionLifecycleCallback = void (RTCPeerConnection pc,
Pref="media.peerconnection.enabled",
JSImplementation="@mozilla.org/dom/peerconnectionstatic;1",
Constructor()]
interface RTCPeerConnectionStatic {
interface mozRTCPeerConnectionStatic {
/* One slot per window (the window in which the register call is made),
automatically unregistered when window goes away.

View File

@ -22,7 +22,7 @@ dictionary RTCSessionDescriptionInit {
[Pref="media.peerconnection.enabled",
JSImplementation="@mozilla.org/dom/rtcsessiondescription;1",
Constructor(optional RTCSessionDescriptionInit descriptionInitDict)]
interface RTCSessionDescription {
interface mozRTCSessionDescription {
attribute RTCSdpType? type;
attribute DOMString? sdp;

View File

@ -1,29 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file includes all the deprecated mozRTC prefixed interfaces.
*
* The declaration of each should match the declaration of the real, unprefixed
* interface. These aliases will be removed at some point (Bug 1155923).
*/
[Deprecated="WebrtcDeprecatedPrefix",
Pref="media.peerconnection.enabled",
JSImplementation="@mozilla.org/dom/rtcicecandidate;1",
Constructor(optional RTCIceCandidateInit candidateInitDict)]
interface mozRTCIceCandidate : RTCIceCandidate {};
[Deprecated="WebrtcDeprecatedPrefix",
Pref="media.peerconnection.enabled",
JSImplementation="@mozilla.org/dom/peerconnection;1",
Constructor (optional RTCConfiguration configuration,
optional object? constraints)]
interface mozRTCPeerConnection : RTCPeerConnection {};
[Deprecated="WebrtcDeprecatedPrefix",
Pref="media.peerconnection.enabled",
JSImplementation="@mozilla.org/dom/rtcsessiondescription;1",
Constructor(optional RTCSessionDescriptionInit descriptionInitDict)]
interface mozRTCSessionDescription : RTCSessionDescription {};

View File

@ -627,7 +627,6 @@ if CONFIG['MOZ_WEBRTC']:
'RTCRtpReceiver.webidl',
'RTCRtpSender.webidl',
'RTCSessionDescription.webidl',
'WebrtcDeprecated.webidl',
'WebrtcGlobalInformation.webidl',
]

View File

@ -6,7 +6,7 @@ if (navigator.mozGetUserMedia) {
console.log("This appears to be Firefox");
// The RTCPeerConnection object.
RTCPeerConnection = RTCPeerConnection || mozRTCPeerConnection;
RTCPeerConnection = mozRTCPeerConnection;
// Get UserMedia (only difference is the prefix).
// Code from Adam Barth.

View File

@ -49,14 +49,14 @@ if (navigator.mozGetUserMedia) {
var RTCPeerConnection = function(pcConfig, pcConstraints) {
// .urls is not supported in FF yet.
maybeFixConfiguration(pcConfig);
return new (RTCPeerConnectioni || mozRTCPeerConnection)(pcConfig, pcConstraints);
return new mozRTCPeerConnection(pcConfig, pcConstraints);
}
// The RTCSessionDescription object.
RTCSessionDescription = RTCSessionDescription || mozRTCSessionDescription;
RTCSessionDescription = mozRTCSessionDescription;
// The RTCIceCandidate object.
RTCIceCandidate = RTCIceCandidate || mozRTCIceCandidate;
RTCIceCandidate = mozRTCIceCandidate;
// Get UserMedia (only difference is the prefix).
// Code from Adam Barth.

View File

@ -19,14 +19,14 @@ var failure = function(x) {
var TabMirror = function(deviceId, window) {
this.deviceId = deviceId;
// Save RTCSessionDescription and RTCIceCandidate for later when the window object is not available.
this.RTCSessionDescription = window.RTCSessionDescription;
this.RTCIceCandidate = window.RTCIceCandidate;
// Save mozRTCSessionDescription and mozRTCIceCandidate for later when the window object is not available.
this.RTCSessionDescription = window.mozRTCSessionDescription;
this.RTCIceCandidate = window.mozRTCIceCandidate;
Services.obs.addObserver((aSubject, aTopic, aData) => this._processMessage(aData), "MediaPlayer:Response", false);
this._sendMessage({ start: true });
this._window = window;
this._pc = new window.RTCPeerConnection(CONFIG, {});
this._pc = new window.mozRTCPeerConnection(CONFIG, {});
if (!this._pc) {
throw "Failure creating Webrtc object";
}

View File

@ -149,5 +149,3 @@ SyncXMLHttpRequestWarning=Synchronous XMLHttpRequest on the main thread is depre
DataContainerEventWarning=Use of DataContainerEvent is deprecated. Use CustomEvent instead.
# LOCALIZATION NOTE: Do not translate "Worker".
EmptyWorkerSourceWarning=Attempting to create a Worker from an empty source. This is probably unintentional.
WebrtcDeprecatedPrefixWarning=WebRTC interfaces with the "moz" prefix (mozRTCPeerConnection, mozRTCSessionDescription, mozRTCIceCandidate) have been deprecated.
NavigatorGetUserMediaWarning=navigator.mozGetUserMedia has been replaced by navigator.mediaDevices.getUserMedia