Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Simplifies code.

Boris Grozeve0522f69775b
diff --git a/modules/xmpp/JingleSessionPC.js b/modules/xmpp/JingleSessionPC.js
index cb5b4a30b9..6fa0fcdf7c 100644
--- a/modules/xmpp/JingleSessionPC.js
+++ b/modules/xmpp/JingleSessionPC.js
@@ -1377,6 +1377,7 @@ JingleSessionPC.prototype.setLocalDescription = function () {
var self = this;
var newssrcs = [];
var session = transform.parse(this.peerconnection.localDescription.sdp);
+ var i;
session.media.forEach(function (media) {
if (media.ssrcs && media.ssrcs.length > 0) {
@@ -1405,8 +1406,8 @@ JingleSessionPC.prototype.setLocalDescription = function () {
// Bind us as local SSRCs owner
if (newssrcs.length > 0) {
- for (var i = 1; i <= newssrcs.length; i ++) {
- var ssrc = newssrcs[i-1].ssrc;
+ for (i = 0; i < newssrcs.length; i++) {
+ var ssrc = newssrcs[i].ssrc;
var myJid = self.connection.emuc.myroomjid;
self.ssrcOwners[ssrc] = myJid;
}