this is why we can't have nice things.... C'mon chrome and mozilla its not that hard to both do the same spec

This commit is contained in:
Anthony Minessale 2014-11-28 15:54:02 -05:00
parent 41bfc18a10
commit 9ca115cf05
1 changed files with 26 additions and 6 deletions

View File

@ -93,10 +93,22 @@
candidateList: []
};
if (moz) {
this.constraints = {
offerToReceiveAudio: true,
offerToReceiveVideo: this.options.useVideo ? true : false,
};
} else {
this.constraints = {
optional: [{
'DtlsSrtpKeyAgreement': 'true'
}],mandatory: {
OfferToReceiveAudio: true,
OfferToReceiveVideo: this.options.useVideo ? true : false,
}
};
}
if (self.options.useVideo) {
self.options.useVideo.style.display = 'none';
@ -111,10 +123,18 @@
if (obj) {
self.options.useVideo = obj;
if (moz) {
self.constraints.offerToReceiveVideo = true;
} else {
self.constraints.mandatory.OfferToReceiveVideo = true;
}
} else {
self.options.useVideo = null;
if (moz) {
self.constraints.offerToReceiveVideo = false;
} else {
self.constraints.mandatory.OfferToReceiveVideo = false;
}
}
if (self.options.useVideo) {