HTMLMediaElement.loop

The HTMLMediaElement.loop property reflects the loop HTML attribute, which controls whether the media element should start over when it reaches the end.

Syntax

var loop = video.loop;
audio.loop = true;

Value

A Boolean.

Example

var obj = document.createElement('video');
obj.loop = true; // true

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'HTMLMediaElement.loop' in that specification.
Living Standard No change from HTML5
HTML5
The definition of 'HTMLMediaElement.loop' in that specification.
Recommendation Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes Yes119 ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes Yes Yes ? ? ?

See also

Document Tags and Contributors

 Contributors to this page: fscholz, erikadoyle, markg
 Last updated by: fscholz,