TrustNXTTrustNXT
React SDKAPI ReferenceInterfaces

UseCaptureAudioOptions

Extends

  • ProtectionConfig

Properties

apiKey?

optional apiKey?: string;

API key for the TrustNXT protection API (simple init).

Inherited from

ProtectionConfig.apiKey

apiSecret?

optional apiSecret?: string;

Shared secret for encrypted/signed API requests.

Inherited from

ProtectionConfig.apiSecret

appId?

optional appId?: string;

Application identifier for device metadata.

Inherited from

ProtectionConfig.appId

appVersion?

optional appVersion?: string;

Application version for device metadata.

Inherited from

ProtectionConfig.appVersion

autoProtect?

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.autoProtect

baseUrl?

optional baseUrl?: string;

Override the default API base URL.

Inherited from

ProtectionConfig.baseUrl

features?

optional features?: Features;

Feature flags / metadata to embed in every seal.

Inherited from

ProtectionConfig.features

height?

optional height?: number;

Waveform height in pixels.

Default

256

locationObfuscationRadius?

optional locationObfuscationRadius?: number;

Radius within which to obfuscate location results for privacy.

Inherited from

ProtectionConfig.locationObfuscationRadius

locationProvider?

optional locationProvider?: LocationProvider;

Adapter for GPS location — defaults to browser navigator.geolocation.

Inherited from

ProtectionConfig.locationProvider

mode

mode: "audio";

onCapture?

optional onCapture?: (event) => void | Promise<void>;

Fired when a recording completes and is transcoded to MP3.

Parameters

ParameterType
eventAudioCaptureEvent

Returns

void | Promise<void>


onProtected?

optional onProtected?: (event) => void;

Fired when cryptographic sealing succeeds (~1–3 s after capture).

Parameters

ParameterType
eventProtectedEvent

Returns

void

Inherited from

ProtectionConfig.onProtected

onProtectError?

optional onProtectError?: (event) => void;

Fired when cryptographic sealing fails.

Parameters

ParameterType
eventProtectErrorEvent

Returns

void

Inherited from

ProtectionConfig.onProtectError

protection?

optional protection?: ProtectionOptions;

Advanced: provide a pre-built ProtectionOptions object instead of apiKey. When set, apiKey/apiSecret/sandbox are ignored.

Inherited from

ProtectionConfig.protection

sandbox?

optional sandbox?: boolean;

Use sandbox environment (default: false).

Inherited from

ProtectionConfig.sandbox

tags?

optional tags?: Record<string, string>;

Custom metadata tags applied to protected assets.

Inherited from

ProtectionConfig.tags

waveColor?

optional waveColor?: string;

Waveform bar color.

Default

"rgba(0, 0, 0, 0.8)"

waveformRef

waveformRef: RefObject<HTMLDivElement | null>;

DOM ref for the waveform container.

On this page