提交 41bfc18a authored 作者: Anthony Minessale's avatar Anthony Minessale

add some stuff to verto for introp

上级 94bb4606
This diff was suppressed by a .gitattributes entry.
......@@ -94,13 +94,8 @@
};
this.constraints = {
optional: [{
'DtlsSrtpKeyAgreement': 'true'
}],
mandatory: {
OfferToReceiveAudio: true,
OfferToReceiveVideo: this.options.useVideo ? true : false,
}
offerToReceiveAudio: true,
offerToReceiveVideo: this.options.useVideo ? true : false,
};
if (self.options.useVideo) {
......@@ -116,10 +111,10 @@
if (obj) {
self.options.useVideo = obj;
self.constraints.mandatory.OfferToReceiveVideo = true;
self.constraints.offerToReceiveVideo = true;
} else {
self.options.useVideo = null;
self.constraints.mandatory.OfferToReceiveVideo = false;
self.constraints.offerToReceiveVideo = false;
}
if (self.options.useVideo) {
......@@ -321,6 +316,9 @@
onStreamError(self);
}
console.log("Mandatory audio constraints", this.options.audioParams);
console.log("Mandatory video constraints", this.options.videoParams);
getUserMedia({
constraints: {
audio: {
......@@ -381,6 +379,9 @@
onStreamError(self);
}
console.log("Mandatory audio constraints", this.options.audioParams);
console.log("Mandatory video constraints", this.options.videoParams);
getUserMedia({
constraints: {
audio: {
......@@ -488,7 +489,7 @@
Booooooooo! This trickle thing is a waste of time...... We'll all have to re-code our engines
to handle partial setups to maybe save 100m
*/
if ((!moz || peer.localDescription.sdp.match(/a=candidate/)) && !x && options.onICESDP) {
if ((!moz || (!options.sentICESDP && peer.localDescription.sdp.match(/a=candidate/)) && !x && options.onICESDP)) {
options.onICESDP(peer.localDescription);
//x = 1;
/*
......@@ -549,12 +550,6 @@
};
var constraints = options.constraints || {
optional: [],
mandatory: {
OfferToReceiveAudio: true,
OfferToReceiveVideo: true
},
/* spec is changed support both ways at once */
offerToReceiveAudio: true,
offerToReceiveVideo: true
};
......@@ -568,8 +563,9 @@
peer.setLocalDescription(sessionDescription);
options.onOfferSDP(sessionDescription);
/* old mozilla behaviour the SDP was already great right away */
if (moz && options.onICESDP && sessionDescription.match(/a=candidate/)) {
if (moz && options.onICESDP && sessionDescription.sdp.match(/a=candidate/)) {
options.onICESDP(sessionDescription);
options.sentICESDP = 1;
}
},
onSdpError, constraints);
......
......@@ -118,6 +118,11 @@
};
$.verto.prototype.videoParams = function(on) {
var verto = this;
verto.options.videoParams = on;
};
$.verto.prototype.iceServers = function(on) {
var verto = this;
verto.options.iceServers = on;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论