瀏覽代碼

Adds method used by torture to obtain current audio levels.

master
damencho 9 年之前
父節點
當前提交
029ccf3b31
共有 1 個文件被更改,包括 20 次插入0 次删除
  1. 20
    0
      modules/statistics/statistics.js

+ 20
- 0
modules/statistics/statistics.js 查看文件

113
                 CallStats.sendAddIceCandidateFailed(e, pc);
113
                 CallStats.sendAddIceCandidateFailed(e, pc);
114
             }
114
             }
115
         );
115
         );
116
+    },
117
+    /**
118
+     * FIXME:
119
+     * Currently used by torture. If we are removing this, torture needs to
120
+     * be fixed also.
121
+     *
122
+     * Obtains audio level reported in the stats for specified peer.
123
+     * @param peerJid full MUC jid of the user for whom we want to obtain last
124
+     *        audio level.
125
+     * @param ssrc the SSRC of audio stream for which we want to obtain audio
126
+     *        level.
127
+     * @returns {*} a float form 0 to 1 that represents current audio level or
128
+     *              <tt>null</tt> if for any reason the value is not available
129
+     *              at this time.
130
+     */
131
+    getPeerSSRCAudioLevel: function (peerJid, ssrc) {
132
+
133
+        var peerStats = rtpStats.jid2stats[peerJid];
134
+
135
+        return peerStats ? peerStats.ssrc2AudioLevel[ssrc] : null;
116
     }
136
     }
117
 };
137
 };

Loading…
取消
儲存