probably a simple thing but I can't think of an easy and good solution …
I want to load one of three videos randomly on page load …
<video loop autoplay class="StretchtoFit">
<source src="assets/videos/cloud.mp4" type="video/mp4">
<source src="assets/videos/cloud.ogg" type="video/ogg">
<source src="assets/videos/cloud.webm" type="video/webm">
</video>
<video loop autoplay class="StretchtoFit">
<source src="assets/videos/bath.mp4" type="video/mp4">
<source src="assets/videos/bath.ogg" type="video/ogg">
<source src="assets/videos/bath.webm" type="video/webm">
</video>
<video loop autoplay class="StretchtoFit">
<source src="assets/videos/train.mp4" type="video/mp4">
<source src="assets/videos/train.ogg" type="video/ogg">
<source src="assets/videos/train.webm" type="video/webm">
</video>
The webpage is php-based. Is there any easy way to use a one of the three tags on random and don't load the other two?
How would you do that?