diff --git a/samples/js/demos/html/dc1.html b/samples/js/demos/html/dc1.html index 21aa4607b1..0dc9a4431e 100644 --- a/samples/js/demos/html/dc1.html +++ b/samples/js/demos/html/dc1.html @@ -89,9 +89,9 @@ function createConnection() { pcConstraint = null; dataConstraint = null; if (sctp_select.checked && - webrtcDetectedBrowser === 'chrome' && - webrtcDetectedVersion >= 31) { - // SCTP is supported from Chrome M31. + (webrtcDetectedBrowser === 'chrome' && webrtcDetectedVersion >= 31) || + webrtcDetectedBrowser === 'firefox'){ + // SCTP is supported from Chrome M31 and is supported in FF. // No need to pass DTLS constraint as it is on by default in Chrome M31. // For SCTP, reliable and ordered is true by default. trace('Using SCTP based Data Channels'); @@ -129,7 +129,7 @@ function createConnection() { pc2.onicecandidate = iceCallback2; pc2.ondatachannel = receiveChannelCallback; - pc1.createOffer(gotDescription1); + pc1.createOffer(gotDescription1, null, null); startButton.disabled = true; closeButton.disabled = false; } @@ -163,7 +163,7 @@ function gotDescription1(desc) { pc1.setLocalDescription(desc); trace('Offer from pc1 \n' + desc.sdp); pc2.setRemoteDescription(desc); - pc2.createAnswer(gotDescription2); + pc2.createAnswer(gotDescription2, null, null); } function gotDescription2(desc) { diff --git a/samples/js/demos/html/dtmf1.html b/samples/js/demos/html/dtmf1.html index 12a7bbb1a2..b97791bc3d 100644 --- a/samples/js/demos/html/dtmf1.html +++ b/samples/js/demos/html/dtmf1.html @@ -62,7 +62,7 @@ function gotStream(stream){ pc1.addStream(localstream); trace("Adding Local Stream to peer connection"); - pc1.createOffer(gotDescription1); + pc1.createOffer(gotDescription1, null, sdpConstraints); } function call() { diff --git a/samples/js/demos/html/multiple.html b/samples/js/demos/html/multiple.html index 83d3817465..97d0c883b1 100644 --- a/samples/js/demos/html/multiple.html +++ b/samples/js/demos/html/multiple.html @@ -89,11 +89,11 @@ function call() { pc1_local.addStream(localstream); trace("Adding local stream to pc1_local"); - pc1_local.createOffer(gotDescription1Local); + pc1_local.createOffer(gotDescription1Local, null, sdpConstraints); pc2_local.addStream(localstream); trace("Adding local stream to pc2_local"); - pc2_local.createOffer(gotDescription2Local); + pc2_local.createOffer(gotDescription2Local, null, sdpConstraints); } function gotDescription1Local(desc) { diff --git a/samples/js/demos/html/pc1-audio.html b/samples/js/demos/html/pc1-audio.html index 0c51c6f00d..cce0125394 100644 --- a/samples/js/demos/html/pc1-audio.html +++ b/samples/js/demos/html/pc1-audio.html @@ -39,7 +39,7 @@ function gotStream(stream){ pc1.addStream(localstream); trace("Adding Local Stream to peer connection"); - pc1.createOffer(gotDescription1); + pc1.createOffer(gotDescription1, null, sdpConstraints); } function call() { diff --git a/samples/js/demos/html/pc1.html b/samples/js/demos/html/pc1.html index d1951dffa1..1c3e9fa53e 100644 --- a/samples/js/demos/html/pc1.html +++ b/samples/js/demos/html/pc1.html @@ -82,7 +82,7 @@ function call() { pc1.addStream(localstream); trace("Adding Local Stream to peer connection"); - pc1.createOffer(gotDescription1); + pc1.createOffer(gotDescription1, null, sdpConstraints); } function gotDescription1(desc){ diff --git a/samples/js/demos/html/pc1_sdp_munge.html b/samples/js/demos/html/pc1_sdp_munge.html index 07fc0dfa53..b4e44a6896 100644 --- a/samples/js/demos/html/pc1_sdp_munge.html +++ b/samples/js/demos/html/pc1_sdp_munge.html @@ -95,10 +95,10 @@ var sdpConstraints = {'mandatory': { refreshSources(); function refreshSources() { - if (webrtcDetectedVersion >= 30) { + if (webrtcDetectedBrowser === 'chrome' && webrtcDetectedVersion >= 30) { MediaStreamTrack.getSources(gotSources); } else { - alert('Make sure that you have Chrome M30 to test device enumeration api.'); + alert('Failed to enumerate devices, you need Chrome version 30 or higher'); } } @@ -215,7 +215,7 @@ function maybeAddLineBreakToEnd(sdp) { } function createOffer(){ - pc1.createOffer(gotDescription1,null,null); + pc1.createOffer(gotDescription1, null, sdpConstraints); } function setOffer(){ diff --git a/samples/js/demos/html/states.html b/samples/js/demos/html/states.html index f905c0d54e..59c12679ff 100644 --- a/samples/js/demos/html/states.html +++ b/samples/js/demos/html/states.html @@ -129,7 +129,7 @@ function call() { pc2.onaddstream = gotRemoteStream; pc1.addStream(localstream); trace("Adding Local Stream to peer connection"); - pc1.createOffer(gotDescription1); + pc1.createOffer(gotDescription1, null, sdpConstraints); } function gotDescription1(desc){