MCPcopy
hub / github.com/fingerprintjs/fingerprintjs / getAudioContextBaseLatency

Function getAudioContextBaseLatency

src/sources/audio_base_latency.ts:12–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10}
11
12export default function getAudioContextBaseLatency(): number {
13 // The signal emits warning in Chrome and Firefox, therefore it is enabled on Safari where it doesn't produce warning
14 // and on Android where it's less visible
15 const isAllowedPlatform = isAndroid() || isWebKit()
16 if (!isAllowedPlatform) {
17 return SpecialFingerprint.Disabled
18 }
19
20 if (!window.AudioContext) {
21 return SpecialFingerprint.NotSupported
22 }
23
24 const latency = new AudioContext().baseLatency
25
26 if (latency === null || latency === undefined) {
27 return SpecialFingerprint.NotSupported
28 }
29
30 if (!isFinite(latency)) {
31 return SpecialFingerprint.NotFinite
32 }
33
34 return latency
35}

Callers

nothing calls this directly

Calls 2

isAndroidFunction · 0.90
isWebKitFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…