Skip to content

Type Alias: AudioWaveformViewRef ​

ts
type AudioWaveformViewRef = object;

Methods available on a ref to AudioWaveformView.

Properties ​

pause ​

ts
pause: () => void;

Pause playback. No effect when playing is controlled.

Returns ​

void


play ​

ts
play: () => void;

Start playback. Called while the source is loading, playback starts as soon as it is ready. No effect when playing is controlled.

Returns ​

void


seekTo ​

ts
seekTo: (positionMs) => void;

Seek to a position in milliseconds, clamped to the duration. Works in controlled mode too and fires onSeek.

Parameters ​

ParameterType
positionMsnumber

Returns ​

void


setSpeed ​

ts
setSpeed: (speed) => void;

Set the playback speed. The native players clamp it to 0.25 to 4. No effect when speed is controlled.

Parameters ​

ParameterType
speednumber

Returns ​

void


toggle ​

ts
toggle: () => void;

Play if paused, pause if playing. No effect when playing is controlled.

Returns ​

void

Released under the MIT License.