HTML DOM Audio pause () method
Examples
With play and pause buttons piece of audio:
var x = document.getElementById ( "myAudio");
function playAudio ()
{
x.play ();
}
function pauseAudio ()
{
x.pause ();
}
function playAudio ()
{
x.play ();
}
function pauseAudio ()
{
x.pause ();
}
try it"
Definition and Usage
pause () method to stop (pause) the audio or video currently playing.
Tip: This method usually play () used with the method.
Tip: Use the controls property to display the audio controls (such as audio on: play, pause, seeking, volume , etc.).
Browser Support
All major browsers support pause () method.
Note: Internet Explorer 8 or earlier browser does not support this method.
grammar
audioObject .pause()
parameter
None |
return value
No return value |
Audio Object