The loop property sets or returns whether a video should start playing over again when it is finished.
This property reflects the <video> loop attribute.
When present, it specifies that the video should start playing over again when it is finished.
Note: The <video> element is new in HTML5.
The loop property is supported in all major browsers.
Note: Internet Explorer 8 and earlier versions, do not support the <video> element.
Return the loop property:
Set the loop property:
Value | Description |
---|---|
true|false |
Specifies whether the video should start playing over again, every time it
is finished
|
Return Value: | A Boolean, returns true if the video starts playing over again, every time it is finished. Otherwise it returns false |
---|---|
Default Value: | false |
Find out if the video should start playing over again every time it is finished, or not:
The result of x will be:
HTML reference: HTML <video> loop attribute