Procházet zdrojové kódy

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

dev1
hristoterezov před 9 roky
rodič
revize
849763dfdc
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1
    1
      JitsiConference.js
  2. 1
    1
      JitsiParticipant.js

+ 1
- 1
JitsiConference.js Zobrazit soubor

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

+ 1
- 1
JitsiParticipant.js Zobrazit soubor

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

Načítá se…
Zrušit
Uložit