浏览代码

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

dev1
hristoterezov 9 年前
父节点
当前提交
849763dfdc
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1
    1
      JitsiConference.js
  2. 1
    1
      JitsiParticipant.js

+ 1
- 1
JitsiConference.js 查看文件

@@ -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 查看文件

@@ -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
 /**

正在加载...
取消
保存