Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML Audio/Video DOM pause() Method

HTML Audio/Video DOM pause() Method

HTML audio/video Tag Reference HTML Audio/Video DOM Reference

Example

A video with play and pause buttons:

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

function playVid()

  {

  myVideo.play();

  }

function pauseVid()

  {

  myVideo.pause();

  } 

Try it »


Definition and Usage

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


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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 Tag Reference HTML Audio/Video DOM Reference