mirror of
https://github.com/jech/galene.git
synced 2024-11-08 17:55:59 +01:00
Fix audio activity detection for downstreams
Replaced the non-existent `track` property in `RTCStatsType` with the valid `inbound-rtp` property.
This commit is contained in:
parent
ea49756a89
commit
1ad91adf89
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue