Simplifies code.
This commit is contained in:
parent
9111797913
commit
e0522f6977
|
@ -1377,6 +1377,7 @@ JingleSessionPC.prototype.setLocalDescription = function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
var newssrcs = [];
|
var newssrcs = [];
|
||||||
var session = transform.parse(this.peerconnection.localDescription.sdp);
|
var session = transform.parse(this.peerconnection.localDescription.sdp);
|
||||||
|
var i;
|
||||||
session.media.forEach(function (media) {
|
session.media.forEach(function (media) {
|
||||||
|
|
||||||
if (media.ssrcs && media.ssrcs.length > 0) {
|
if (media.ssrcs && media.ssrcs.length > 0) {
|
||||||
|
@ -1405,8 +1406,8 @@ JingleSessionPC.prototype.setLocalDescription = function () {
|
||||||
|
|
||||||
// Bind us as local SSRCs owner
|
// Bind us as local SSRCs owner
|
||||||
if (newssrcs.length > 0) {
|
if (newssrcs.length > 0) {
|
||||||
for (var i = 1; i <= newssrcs.length; i ++) {
|
for (i = 0; i < newssrcs.length; i++) {
|
||||||
var ssrc = newssrcs[i-1].ssrc;
|
var ssrc = newssrcs[i].ssrc;
|
||||||
var myJid = self.connection.emuc.myroomjid;
|
var myJid = self.connection.emuc.myroomjid;
|
||||||
self.ssrcOwners[ssrc] = myJid;
|
self.ssrcOwners[ssrc] = myJid;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue