YouTip LogoYouTip

Met Video Pause

HTML DOM Video pause() Method

HTML DOM Video pause() Method

-- Learning not just technology, but dreams!

JavaScript Reference Manual

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

HTML DOM Track Object

HTML DOM Video play() Method

Video pause() Method

Image 8: Video Object Reference Manual 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 yourself Β»


Definition and Usage

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

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

Tip: Use the controls attribute to display video controls (like play, pause, seek, volume, etc.).


Browser Support

Image 9: Internet ExplorerImage 10: FirefoxImage 11: OperaImage 12: Google ChromeImage 13: Safari

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


Image 14: Video Object Reference Manual Video Object

← Prop Video WidthMet Video Play β†’