X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Audio pause() Method

Audio Object Reference Audio Object

Example

An audio player with play and pause buttons:

var x = document.getElementById("myAudio");

function playAudio() {
    x.play();
}

function pauseAudio() {
    x.pause();
}

Try it yourself »


Definition and Usage

The pause() method halts (pauses) the currently playing audio.

Tip: This method is often used together with the play() method.

Tip: Use the controls property to display audio controls (like play, pause, seeking, volume, etc, attached on the audio).


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The pause() method is supported in all major browsers.

Note: This method is not supported in Internet Explorer 8 and earlier.


Syntax

audioObject.pause()

Parameters

None

Return Value

No return value


Audio Object Reference Audio Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook