diff --git a/static/galene.js b/static/galene.js index 6521641..c0b6769 100644 --- a/static/galene.js +++ b/static/galene.js @@ -767,7 +767,7 @@ function gotDownStats(stats) { c.pc.getReceivers().forEach(r => { let tid = r.track && r.track.id; let s = tid && stats[tid]; - let energy = s && s['track'] && s['track'].audioEnergy; + let energy = s && s['inbound-rtp'] && s['inbound-rtp'].audioEnergy; if(typeof energy === 'number') maxEnergy = Math.max(maxEnergy, energy); }); diff --git a/static/protocol.js b/static/protocol.js index a7ede26..cd4c6cc 100644 --- a/static/protocol.js +++ b/static/protocol.js @@ -1466,7 +1466,7 @@ Stream.prototype.updateStats = async function() { if(report) { for(let r of report.values()) { - if(rtid && r.type === 'track') { + if(rtid && r.type === 'inbound-rtp') { if(!('totalAudioEnergy' in r)) continue; if(!stats[rtid])