Browse Source

Adds forgotten, but necessary for simulcast, modifications to libs/strophe.jingle.sessionbase.js.

master
George Politis 11 years ago
parent
commit
555bdd7af5
1 changed files with 18 additions and 0 deletions
  1. 18
    0
      libs/strophe/strophe.jingle.sessionbase.js

+ 18
- 0
libs/strophe/strophe.jingle.sessionbase.js View File

191
             });
191
             });
192
             modify.up(); // end of source
192
             modify.up(); // end of source
193
         });
193
         });
194
+
195
+        // generate source groups from lines
196
+        channel.ssrcGroups.forEach(function(ssrcGroup) {
197
+            if (ssrcGroup.ssrcs.length != 0) {
198
+
199
+                modify.c('ssrc-group', {
200
+                    semantics: ssrcGroup.semantics,
201
+                    xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0'
202
+                });
203
+
204
+                ssrcGroup.ssrcs.forEach(function (ssrc) {
205
+                    modify.c('source', { ssrc: ssrc })
206
+                        .up(); // end of source
207
+                });
208
+                modify.up(); // end of ssrc-group
209
+            }
210
+        });
211
+
194
         modify.up(); // end of description
212
         modify.up(); // end of description
195
         modify.up(); // end of content
213
         modify.up(); // end of content
196
     });
214
     });

Loading…
Cancel
Save