English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

Complete list of HTML tags

HTML Audio/Video DOM pause() method

The pause() method pauses the playback of the media. If the media is already paused, this method will be ineffective.

 HTML Audio/Video DOM Reference Manual

Online Example

A video clip with play and pause buttons:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML Audio/Video play() method usage-Basic Tutorial(oldtoolbag.com)</title>
</head>
<body>
<button onclick="playVid()" type="button">Play Video</button>
<button onclick="pauseVid()" type="button">Pause Video</button> 
<br> 
<video id="video"1">
  <source src="movie.mp"4"type="video"/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support HTML5 video Tag.
</video>
<script> 
var myVideo = document.getElementById("video",1"); 
function playVid()
{ 
  myVideo.play(); 
} 
function pauseVid()
{ 
  myVideo.pause(); 
} 
</script> 
</body>
</html>
Test to see ‹/›

Definition and Usage

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

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the pause() method.

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

Syntax

audio|video.pause()

 HTML Audio/Video DOM Reference Manual