Skip to content

Commit

Permalink
Audio: Add delay parameter to stop(). (#1258)
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 authored Sep 24, 2024
1 parent 6e54c7f commit 3272dd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion types/three/src/audio/Audio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,17 @@ export class Audio<NodeType extends AudioNode = GainNode> extends Object3D {
* If {@link Audio.hasPlaybackControl | hasPlaybackControl} is true, starts playback.
*/
play(delay?: number): this;

/**
* If {@link Audio.hasPlaybackControl | hasPlaybackControl} is true, pauses playback.
*/
pause(): this;

/**
* If {@link Audio.hasPlaybackControl | hasPlaybackControl} is enabled, stops playback.
* @param delay (optional) - The delay, in seconds, at which the audio should start playing.
*/
stop(): this;
stop(delay?: number): this;

/**
* Called automatically when playback finished.
Expand Down

0 comments on commit 3272dd3

Please sign in to comment.