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 is 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("video1"); 
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