Browse Source

Changes JitsiConference.getLocalTracks and JitsiParticipant.getTracks to return cloned array of tracks

dev1
hristoterezov 9 years ago
parent
commit
849763dfdc
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      JitsiConference.js
  2. 1
    1
      JitsiParticipant.js

+ 1
- 1
JitsiConference.js View File

171
  */
171
  */
172
 JitsiConference.prototype.getLocalTracks = function () {
172
 JitsiConference.prototype.getLocalTracks = function () {
173
     if (this.rtc) {
173
     if (this.rtc) {
174
-        return this.rtc.localStreams;
174
+        return this.rtc.localStreams.slice();
175
     } else {
175
     } else {
176
         return [];
176
         return [];
177
     }
177
     }

+ 1
- 1
JitsiParticipant.js View File

29
  * @returns {Array.<JitsiTrack>} The list of media tracks for this participant.
29
  * @returns {Array.<JitsiTrack>} The list of media tracks for this participant.
30
  */
30
  */
31
 JitsiParticipant.prototype.getTracks = function() {
31
 JitsiParticipant.prototype.getTracks = function() {
32
-    return this._tracks;
32
+    return this._tracks.slice();
33
 };
33
 };
34
 
34
 
35
 /**
35
 /**

Loading…
Cancel
Save