Latest web development tutorials

HTML DOM Video loop properties

Video Object Reference Video Object

Examples

Set video loop:

. Document.getElementById ( "myVideo") loop = true;

try it"

Definition and Usage

loop property sets or returns whether the video should be played again at the end.

This property reflects the <video> loop property.

When the existence of the property, which is described in the video playback end whether to play again.

Note: <video> element in HTML5 is new.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support loop properties

Note: Internet Explorer 8 and earlier versions of IE do not support the <video> element.


grammar

Back loop properties:

videoObject .loop

Set loop properties:

videoObject .loop = true | false

Property Value

value description
true | false It describes whether to play the video again after the end of each player
  • true - Indicates video should play again at the end.
  • false - default. It instructs the video should not be playing again at the end.

technical details

return value: Boolean value that, if the video playback after the end of each re-play returns true, otherwise returns false.
Defaults: false


More examples

Examples

View the video at the end of each play is re-started playing:

var x = document.getElementById ( "myVideo") loop.;
x The output is:
true

try it"


Related Pages

HTML Reference Manual: HTML <Video> Loop Properties


Video Object Reference Video Object