W3cubDocs

/Web APIs

RTCAudioSourceStats: totalAudioEnergy property

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The RTCAudioSourceStats dictionary's totalAudioEnergy property represents the total audio energy of the media source over the lifetime of this stats object.

The total energy across a particular duration can be determined by subtracting the value of this property returned by two different getStats() calls.

Note: For audio energy of remotely sourced tracks, see RTCInboundRtpStreamStats.totalAudioEnergy.

Value

A number produced by summing the energy of every sample over the lifetime of this stats object.

The energy of each sample is calculated by dividing the sample's value by the highest-intensity encodable value, squaring the result, and then multiplying by the duration of the sample in seconds. This is shown as an equation below:

duration ( sample_level max_level ) 2

Note that if multiple audio channels are used, the audio energy of a sample refers to the highest energy of any channel.

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
totalAudioEnergy 80 80 No No 67 No 80 80 No 57 No 13.0

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCAudioSourceStats/totalAudioEnergy