Skip to Content
Platform.Ontology

AudioContext hardware properties

Reads the audio output sample rate, latency and channel count with no prompt.

Gets silentlyGraphics and fingerprintingAudioWeb browsersWhen the page loads

In one line

Can see your audio setup, such as sample rate and output channels

Reads the audio output sample rate, latency and channel count with no prompt.

Sample rate (44100 or 48000), base and output latency and maximum output channels reveal the audio hardware and OS audio stack, such as wired headphones, Bluetooth or a studio interface.

What it can and can't do

What the user does: Nothing. It happens when the page loads

It can

  • Check the sample rate, usually 44100 or 48000
  • Check how much delay the audio system has
  • Count the most speaker channels your device can output
  • Guess if you use headphones, Bluetooth or built in speakers

It cannot

  • Listen to you or record sound
  • Name your exact headphones or speakers
  • Ask you first, since there is no pop up
  • Play sound without a tap or click on the page in many browsers

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported142011-09-16None
EdgeSupported122015-07-29None
FirefoxSupported252013-10-29None
SafariPartial62012-07-25baseLatency only, no outputLatency
Safari on iPhoneSupported62012-09-10None
Chrome on AndroidSupported182012-06-27None
Samsung InternetSupported1.02013-04-27None

How a site asks for it

APInew AudioContext(); ctx.sampleRate; baseLatency; outputLatency; destination.maxChannelCount
Browser compat keysapi.BaseAudioContext.sampleRate
api.AudioContext.outputLatency
How access is grantednone
What the user seesNot listed
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsNot listed
How to take it backNot listed
Inside an iframeNot listed

Typical flow

  1. Create AudioContext (may start suspended)
  2. Read properties

Data you get

What comes back: 4 numbers
Shape: object

FieldTypeUnitRangePrecision
sampleRateintegerHz8000 to 96000exact
baseLatencyfloats0 to 0.11 ms or finer
outputLatencyfloats0 to 0.51 ms or finer, Chrome and Firefox only
maxChannelCountintegerNone2 to 32exact

Technical limits

  • Cannot enumerate devices without mic permission
  • Autoplay policy may leave context suspended but properties still readable

The story

What it is

A page reads your audio output's sample rate, delay and channel count without asking.

For you

You never see a prompt. The page learns whether you are on built in speakers, Bluetooth headphones or a studio sound card, just by checking a few numbers.

For makers

Audio apps need these numbers to keep sound in time. The same numbers help fraud and tracking tools tell devices apart, and tell phones from desktops.

Where you see it

TypeExampleApps
gamesA rhythm game in the browser reads your audio delay and shifts the notes so they match what you hear.None named
musicA web piano or synth like Chrome Music Lab picks the best buffer size for your hardware to avoid crackles.Chrome Music Lab
videoA video call tool sets its sound rate to match your headset so the voice stays clear.Google Meet, Jitsi
securityA fraud engine notes that a login came from a device with an unusual sound setup.None named
adsA tracking script includes your sample rate in a device ID along with screen size and fonts.None named
creativeA browser based music studio warns that Bluetooth adds delay, and suggests wired headphones for recording.Soundtrap, BandLab
educationA web ear training app measures output delay so it can grade your tapping timing fairly.None named

Risks

  • Reveals what headphones you use
  • Adds to a device ID

What the platform says

  • MDN: AudioContext. Represents an audio processing graph and exposes properties like sample rate and output latency.

Good uses and abuse

Legitimate uses

  • Set buffer sizes for audio apps

Known abuse

  • Hardware class and Bluetooth inference

Scores

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility2 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits3Rough identifying entropy, when known

Sources

How well checked: Based on official documentation.

On this page