UseCaptureAudioOptions
Extends
ProtectionConfig
Properties
apiKey?
optional apiKey?: string;API key for the TrustNXT protection API (simple init).
Inherited from
ProtectionConfig.apiKeyapiSecret?
optional apiSecret?: string;Shared secret for encrypted/signed API requests.
Inherited from
ProtectionConfig.apiSecretappId?
optional appId?: string;Application identifier for device metadata.
Inherited from
ProtectionConfig.appIdappVersion?
optional appVersion?: string;Application version for device metadata.
Inherited from
ProtectionConfig.appVersionautoProtect?
optional autoProtect?: boolean;When true (default), captures are automatically queued for protection.
Set to false for deferred flows where the consumer calls
enqueueProtection() manually after additional user input.
Inherited from
ProtectionConfig.autoProtectbaseUrl?
optional baseUrl?: string;Override the default API base URL.
Inherited from
ProtectionConfig.baseUrlfeatures?
optional features?: Features;Feature flags / metadata to embed in every seal.
Inherited from
ProtectionConfig.featuresheight?
optional height?: number;Waveform height in pixels.
Default
256locationObfuscationRadius?
optional locationObfuscationRadius?: number;Radius within which to obfuscate location results for privacy.
Inherited from
ProtectionConfig.locationObfuscationRadiuslocationProvider?
optional locationProvider?: LocationProvider;Adapter for GPS location — defaults to browser navigator.geolocation.
Inherited from
ProtectionConfig.locationProvidermode
mode: "audio";onCapture?
optional onCapture?: (event) => void | Promise<void>;Fired when a recording completes and is transcoded to MP3.
Parameters
| Parameter | Type |
|---|---|
event | AudioCaptureEvent |
Returns
void | Promise<void>
onProtected?
optional onProtected?: (event) => void;Fired when cryptographic sealing succeeds (~1–3 s after capture).
Parameters
| Parameter | Type |
|---|---|
event | ProtectedEvent |
Returns
void
Inherited from
ProtectionConfig.onProtectedonProtectError?
optional onProtectError?: (event) => void;Fired when cryptographic sealing fails.
Parameters
| Parameter | Type |
|---|---|
event | ProtectErrorEvent |
Returns
void
Inherited from
ProtectionConfig.onProtectErrorprotection?
optional protection?: ProtectionOptions;Advanced: provide a pre-built ProtectionOptions object instead of apiKey.
When set, apiKey/apiSecret/sandbox are ignored.
Inherited from
ProtectionConfig.protectionsandbox?
optional sandbox?: boolean;Use sandbox environment (default: false).
Inherited from
ProtectionConfig.sandboxtags?
optional tags?: Record<string, string>;Custom metadata tags applied to protected assets.
Inherited from
ProtectionConfig.tagswaveColor?
optional waveColor?: string;Waveform bar color.
Default
"rgba(0, 0, 0, 0.8)"waveformRef
waveformRef: RefObject<HTMLDivElement | null>;DOM ref for the waveform container.