I have a video in an iframe (the video is from my domain) I want the video to repeat after it finishes.
<iframe src="video/video1.mp4" width="100px" height="100px" allowullScreen></iframe>
Please help.
Thanks in advance!
I have a video in an iframe (the video is from my domain) I want the video to repeat after it finishes.
<iframe src="video/video1.mp4" width="100px" height="100px" allowullScreen></iframe>
Please help.
Thanks in advance!
you provided the following code:
<iframe src="video/video1.mp4" width="100px" height="100px" allowFullScreen></iframe>
in order to let it repeat itself just do the following:
<video style="width: 100px; height: 100px" controls loop>
<source src="video/video1.mp4" type="video/mp4">
Your browser does not support playing this Video
</video>
I think it would be better if, instead of using the iframe tag (which is for displaying webpages not content like videos), you use the HTML5 <video>
tag. This is better because it allows you to loop the video easily, without js even, and allows much greater control. It also has a better UI.
<video width="320" height="240" loop autoplay>
<source src="video/video1.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
That's all you need!
EDIT:
If you want to customise the video there may be other attributes you find useful:
<video ... loop ... >
: loops the video.
<video ... autoplay ... >
: starts the video automatically.
<video ... controls ... >
: adds controls on the bottom of the video so the user can play and pause the video etc.
<video ... muted ... >
: mutes the video so no sound is played.