Update dc1 demo as it was using invalid data Constraint (Reliable:true) for SCTP. The constraint Reliable is not supported by Standard and ignored in our implementation. See issue 2511.
R=dutton@google.com, jiayl@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2739004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5030 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -72,21 +72,31 @@ function enableStartButton() {
|
|||||||
startButton.disabled = false;
|
startButton.disabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function disableSendButton() {
|
||||||
|
sendButton.disabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
rtp_select.onclick = sctp_select.onclick = function() {
|
||||||
|
dataChannelReceive.value = '';
|
||||||
|
dataChannelSend.value = '';
|
||||||
|
disableSendButton();
|
||||||
|
enableStartButton();
|
||||||
|
};
|
||||||
|
|
||||||
function createConnection() {
|
function createConnection() {
|
||||||
dataChannelSendId.placeholder = "";
|
dataChannelSendId.placeholder = "";
|
||||||
var servers = null;
|
var servers = null;
|
||||||
pcConstraint = {optional: [{RtpDataChannels: true}]};
|
pcConstraint = null;
|
||||||
dataConstraint = {reliable: false};
|
dataConstraint = null;
|
||||||
if (sctp_select.checked &&
|
if (sctp_select.checked &&
|
||||||
webrtcDetectedBrowser === 'chrome' &&
|
webrtcDetectedBrowser === 'chrome' &&
|
||||||
webrtcDetectedVersion >= 31) {
|
webrtcDetectedVersion >= 31) {
|
||||||
// SCTP is supported from Chrome M31. In current canary builds,
|
// SCTP is supported from Chrome M31.
|
||||||
// you might need to enable it through flag #enable-sctp-data-channels.
|
// No need to pass DTLS constraint as it is on by default in Chrome M31.
|
||||||
// Use SCTP with reliable set to true.
|
// For SCTP, reliable and ordered is true by default.
|
||||||
pcConstraint = {optional: [{DtlsSrtpKeyAgreement: true}]};
|
|
||||||
dataConstraint = {reliable: true};
|
|
||||||
trace('Using SCTP based Data Channels');
|
trace('Using SCTP based Data Channels');
|
||||||
} else {
|
} else {
|
||||||
|
pcConstraint = {optional: [{RtpDataChannels: true}]};
|
||||||
if (!rtp_select.checked) {
|
if (!rtp_select.checked) {
|
||||||
// Use rtp data channels for chrome versions older than M31.
|
// Use rtp data channels for chrome versions older than M31.
|
||||||
trace('Using RTP based Data Channels,' +
|
trace('Using RTP based Data Channels,' +
|
||||||
|
Reference in New Issue
Block a user