|
@@ -42,6 +42,11 @@ function JingleSessionPC(me, sid, connection, service) {
|
42
|
42
|
this.addingStreams = false;
|
43
|
43
|
|
44
|
44
|
this.wait = true;
|
|
45
|
+ /**
|
|
46
|
+ * A map that stores SSRCs of local streams
|
|
47
|
+ * @type {{}} maps media type('audio' or 'video') to SSRC number
|
|
48
|
+ */
|
|
49
|
+ this.localStreamsSSRC = {};
|
45
|
50
|
this.ssrcOwners = {};
|
46
|
51
|
this.ssrcVideoTypes = {};
|
47
|
52
|
|
|
@@ -550,6 +555,15 @@ JingleSessionPC.prototype.readSsrcInfo = function (contents) {
|
550
|
555
|
});
|
551
|
556
|
};
|
552
|
557
|
|
|
558
|
+/**
|
|
559
|
+ * Returns the SSRC of local audio stream.
|
|
560
|
+ * @param mediaType 'audio' or 'video' media type
|
|
561
|
+ * @returns {*} the SSRC number of local audio or video stream.
|
|
562
|
+ */
|
|
563
|
+JingleSessionPC.prototype.getLocalSSRC = function (mediaType) {
|
|
564
|
+ return this.localStreamsSSRC[mediaType];
|
|
565
|
+};
|
|
566
|
+
|
553
|
567
|
JingleSessionPC.prototype.getSsrcOwner = function (ssrc) {
|
554
|
568
|
return this.ssrcOwners[ssrc];
|
555
|
569
|
};
|
|
@@ -1505,6 +1519,8 @@ JingleSessionPC.prototype.setLocalDescription = function () {
|
1505
|
1519
|
'ssrc': ssrc.id,
|
1506
|
1520
|
'type': media.type
|
1507
|
1521
|
});
|
|
1522
|
+ // FIXME allows for only one SSRC per media type
|
|
1523
|
+ self.localStreamsSSRC[media.type] = ssrc.id;
|
1508
|
1524
|
});
|
1509
|
1525
|
}
|
1510
|
1526
|
|