Adds method used by torture to obtain current audio levels.
This commit is contained in:
parent
7e35794e47
commit
029ccf3b31
|
@ -113,5 +113,25 @@ export default {
|
|||
CallStats.sendAddIceCandidateFailed(e, pc);
|
||||
}
|
||||
);
|
||||
},
|
||||
/**
|
||||
* FIXME:
|
||||
* Currently used by torture. If we are removing this, torture needs to
|
||||
* be fixed also.
|
||||
*
|
||||
* Obtains audio level reported in the stats for specified peer.
|
||||
* @param peerJid full MUC jid of the user for whom we want to obtain last
|
||||
* audio level.
|
||||
* @param ssrc the SSRC of audio stream for which we want to obtain audio
|
||||
* level.
|
||||
* @returns {*} a float form 0 to 1 that represents current audio level or
|
||||
* <tt>null</tt> if for any reason the value is not available
|
||||
* at this time.
|
||||
*/
|
||||
getPeerSSRCAudioLevel: function (peerJid, ssrc) {
|
||||
|
||||
var peerStats = rtpStats.jid2stats[peerJid];
|
||||
|
||||
return peerStats ? peerStats.ssrc2AudioLevel[ssrc] : null;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue