I am not so good at this so I looked everywhere and can’t seem to find a solution to my problem. I have a code that shows a slides of images and I want to add a video in the last or first slide that will auto play and present from beginning to end in full length, then right after continue with the images . For an example the first slide will present the full video then the images will present one after another until the last one and then again come back in a loop to the video . I want The video and the images to be in thr same folder as the code.
I’ve tried many codes but in each seemed something not working hing I need something simple and not too long.
<html>
<head>
<meta http-equiv="refresh" content="3600" >
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="refresh" content="3600" >
<style>
* {box-sizing: border-box;}
body {font-family: Verdana, sans-serif;}
.mySlides {display: none;}
img {vertical-align: middle;}
/* Slideshow container */
.slideshow-container {
width: 100%;
height: auto;
position: relative;
margin: auto;
}
.responsive {
height: auto;
}
/* Caption text */
.text {
color: #f2f2f2;
font-size: 15px;
padding: 8px 12px;
position: absolute;
bottom: 8px;
width: 100%;
text-align: center;
}
/* Number text (1/14 etc) */
.numbertext {
color: #f2f2f2;
font-size: 12px;
padding: 8px 12px;
position: absolute;
top: 0;
}
/* The dots/bullets/indicators */
.dot {
height: 15px;
width: 15px;
margin: 0 2px;
background-color: #bbb;
border-radius: 50%;
display: inline-block;
transition: background-color 0.6s ease;
}
.active {
background-color: #717171;
}
/* Fading animation */
.fade {
-webkit-animation-name: fade;
-webkit-animation-duration: 1.5s;
animation-name: fade;
animation-duration: 1.5s;
}
@-webkit-keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
@keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
/* On smaller screens, decrease text size */
@media only screen and (max-width: 300px) {
.text {font-size: 11px}
}
#myVideo {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
}
</style>
</head>
<body>
<div class="slideshow-container">
<div class="mySlides fade">
<div class="numbertext">1 / 14</div>
<img src="2.png" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">2 / 14</div>
<img src="3.png" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">3 / 14</div>
<img src="4.png" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">4 / 14</div>
<img src="5.png" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">5 / 14</div>
<img src="6.png" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">6 / 14</div>
<img src="7.png" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">7 / 14</div>
<img src="8.png" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">8 / 14</div>
<img src="9.png" style="width:100%">
<br>
</div>
<div class="mySlides fade">
<div class="numbertext">9 / 14</div>
<img src="10.png" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">10 / 14</div>
<img src="11.png" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">11 / 14</div>
<img src="12.png" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">12 / 14</div>
<img src="13.png" style="width:100%">
</div>
<br>
<div class="mySlides fade">
<div class="numbertext">13 / 14</div>
<img src="1.png" style="width:100%">
</div>
<div style="text-align:center">
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
</div>
<script>
var slideIndex = 0;
showSlides();
function showSlides() {
var i;
var slides = document.getElementsByClassName("mySlides");
var dots = document.getElementsByClassName("dot");
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
slideIndex++;
if (slideIndex > slides.length) {slideIndex = 1}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" active", "");
}
slides[slideIndex-1].style.display = "block";
dots[slideIndex-1].className += " active";
setTimeout(showSlides, 20000); //
}
</script>
</body>
</html>
'
I need to add more code to present video and photos in full screen synchronously
Thank you so much