Skip to main content
GitHub

Source

useMultibandTrackVolume

Note

This feature is experimental and may change or be removed based on developer feedback and real-world usage.

Hook for tracking the volume of an audio track across multiple frequency bands using the Web Audio API.

Import

import { useMultibandTrackVolume } from "@livekit/components-react";

Properties

options.analyserOptionsAnalyserOptions
options.bandsnumber
options.hiPassnumber

cut off of frequency bins on the higher end Note: this is not a frequency measure, but in relation to analyserOptions.fftSize,

options.loPassnumber

cut off of frequency bins on the lower end Note: this is not a frequency measure, but in relation to analyserOptions.fftSize,

options.updateIntervalnumber

update should run every x ms

trackOrTrackReferenceLocalAudioTrack | RemoteAudioTrack | TrackReferenceOrPlaceholder

Returns

number[]