Latest web development tutorials

HTML DOM Video pause () method

Video Object Reference Video Object

Examples

A video with a play and pause button:

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

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

function pauseVid ()
{
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 video controls (such as: play, pause, search, volume, etc.).


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support pause () method

Note: Internet Explorer 8 and earlier versions of IE does not support this method.


grammar

videoObject .pause ()

parameter

None

return value

No return value


Video Object Reference Video Object