Search...
stop( )
Stops playback.
Description
The stop()
function stops the playback, moves to the beginning
of the audio track, and fires a pause
event.
The pause
event handlers set on the audio player by the onPause( )
function are called.
Syntax
function stop(): Promise<void>
stop Parameters
This function does not take any parameters.
Returns
Fulfilled - When playback has been stopped.
Return Type:
Promise<void>
Was this helpful?
Stop playback
Copy Code
1$w("#myAudioPlayer").stop();
Stop playback and log a message when done
Copy Code
1$w("#myAudioPlayer").stop()2 .then( () => {3 console.log("Done with stop");4 } );