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

HTML DOM Video pause() method

Video pause() method

Video Object Reference The Video object

Example

A video with play and pause buttons:

var

x

=

document

.

getElementById

(

"

myVideo

"

)

;

function

playVid

(

)

{

x

.

play

(

)

;

}

function

pauseVid

(

)

{

x

.

pause

(

)

;

}

Try it »


Definition and Usage

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

**Tip:** This method is usually used together with play() the method.

**Tip:** Use controls attribute to display video controls (such as play, pause, seek, volume, etc.).


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the pause() method

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


Syntax

videoObject

.pause()

Parameters

None

Return Value

No return value

Video Object Reference The Video object