Search.../

pause( )

Pauses playback.

Description

The pause() function pauses 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 pause(): Promise<void>

pause Parameters

This function does not take any parameters.

Returns

Fulfilled - When playback has been paused.

Return Type:

Promise<void>

Was this helpful?

Pause playback

Copy Code
1$w("#myAudioPlayer").pause();
Pause playback and log a message when done

Copy Code
1$w("#myAudioPlayer").pause()
2 .then( () => {
3 console.log("Done with pause");
4 } );