AudioContext hardware properties
Reads the audio output sample rate, latency and channel count with no prompt.
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
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 14 | 2011-09-16 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 25 | 2013-10-29 | None |
| Safari | Partial | 6 | 2012-07-25 | baseLatency only, no outputLatency |
| Safari on iPhone | Supported | 6 | 2012-09-10 | None |
| Chrome on Android | Supported | 18 | 2012-06-27 | None |
| Samsung Internet | Supported | 1.0 | 2013-04-27 | None |
How a site asks for it
| API | new AudioContext(); ctx.sampleRate; baseLatency; outputLatency; destination.maxChannelCount |
| Browser compat keys | api.BaseAudioContext.sampleRateapi.AudioContext.outputLatency |
| How access is granted | none |
| What the user sees | Not listed |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | Not listed |
| How to take it back | Not listed |
| Inside an iframe | Not listed |
Typical flow
- Create AudioContext (may start suspended)
- Read properties
Data you get
What comes back: 4 numbers
Shape: object
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
sampleRate | integer | Hz | 8000 to 96000 | exact |
baseLatency | float | s | 0 to 0.1 | 1 ms or finer |
outputLatency | float | s | 0 to 0.5 | 1 ms or finer, Chrome and Firefox only |
maxChannelCount | integer | None | 2 to 32 | exact |
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
| Type | Example | Apps |
|---|---|---|
| games | A rhythm game in the browser reads your audio delay and shifts the notes so they match what you hear. | None named |
| music | A web piano or synth like Chrome Music Lab picks the best buffer size for your hardware to avoid crackles. | Chrome Music Lab |
| video | A video call tool sets its sound rate to match your headset so the voice stays clear. | Google Meet, Jitsi |
| security | A fraud engine notes that a login came from a device with an unusual sound setup. | None named |
| ads | A tracking script includes your sample rate in a device ID along with screen size and fonts. | None named |
| creative | A browser based music studio warns that Bluetooth adds delay, and suggests wired headphones for recording. | Soundtrap, BandLab |
| education | A 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
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 2 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 3 | Rough identifying entropy, when known |
Related capabilities
Related
- AudioContext rendering fingerprint. Can run a silent sound test and turn the result into a device number
Sources
How well checked: Based on official documentation.