Easy Tutorial
❮ Prop Month Name Prop Style Wordspacing ❯

Audio pause() Method

Audio Object

Example

A piece of audio with play and pause buttons:

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

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

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

Definition and Usage

The pause() method stops (pauses) the currently playing audio or video.

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

Tip: Use the controls attribute to display audio controls (such as play, pause, seeking, volume, etc.) on the audio.


Browser Support

All major browsers support the pause() method.

Note: Internet Explorer 8 or earlier versions do not support this method.


Syntax

Parameters

| None |

Return Value

| No return value |


❮ Prop Month Name Prop Style Wordspacing ❯