Web/API/RTCRtpContributingSource/audioLevel

From Get docs


The read-only audioLevel property of the RTCRtpContributingSource interface indicates the audio level contained in the last RTP packet played from the described source. audioLevel will be the level value defined in [RFC6465] if the RFC 6465 header extension is present, and otherwise null.

Syntax

var audioLevel = RTCRtpContributingSource.audioLevel

Value

A double-precision floating-point number which indicates the volume level of the audio in the most recently received RTP packet from the source described by the RTCRtpContributingSource.

This value, which is in the range 0.0 to 1.0, is on a linear scale and its value is defined in dBov, or decibels (overload). This is the amplitude relative to the point at which clipping of the audio begins to occur. A value of 1.0 represents 0 dBov (maximum volume), a value of 0.0 represents silence, and a value of 0.5 represents approximately 6 dB SPL (decibels of sound pressure level) change in the sound pressure level from 0 dBov.

For both RTCRtpContributingSource and RTCRtpSynchronizationSource, the audio level is converted to this form from the values defined in the specifications corresponding to each type of source.

audioLevel may be absent from RTCRtpContributingSource objects, which indicates that no volume level was provided by the source; however, it is required and always available on all RTCRtpSynchronizationSource objects.


Specifications

Specification Status Comment
WebRTC 1.0: Real-time Communication Between BrowsersThe definition of 'audioLevel' in that specification. Candidate Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
audioLevel Chrome

No support No

Edge

No support No

Firefox Full support 59

Disabled'

Full support 59

Disabled'

Disabled' From version 59: this feature is behind the media.peerconnection.rtpsourcesapi.enable preference (needs to be set to true). To change preferences in Firefox, visit about:config.

IE

No support No

Opera

No support No

Safari

?

WebView Android

No support No

Chrome Android

No support No

Firefox Android Full support 59

Disabled'

Full support 59

Disabled'

Disabled' From version 59: this feature is behind the media.peerconnection.rtpsourcesapi.enable preference (needs to be set to true). To change preferences in Firefox, visit about:config.

Opera Android

No support No

Safari iOS

?

Samsung Internet Android

No support No

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
User must explicitly enable this feature.'
User must explicitly enable this feature.