As part of a website project I am currently working on I am trying to have videos display in a slideshow type fashion. There is a main video that is currently playing and underneath it are the other videos which are lined up to play. The one at the front of the list will start playing once the main one finishes. I've attached an image to show what I'm meaning.
I've got the main video to play by doing:
<video id=v controls loop align="right">
<?php
try {
$stmt = $dbconn->query('SELECT videoid, video, videotitle, editedby
FROM videos
ORDER BY RAND()
LIMIT 1');
while($row = $stmt->fetch()){
$video = $row['video'];
}
}catch(PDOException $e) {
echo $e->getMessage();
}
?>
<source src="users/videos/<?php echo $video;?>" type="video/mp4">
</video>
As you'll be able to see video is selected at random. So my question is how do I go about to show the rest of the videos in the databases below it in like a slideshow type way? I would like whenever the main video finishes, the next video will start playing automatically and the video that was playing will then join at the end of the slideshow. The user should also be able to look through the slideshows and select a video of their choice which should then start playing and the video that is currently playing will then join the end of the slideshow.
Is there a 3rd party library that I can use or are there other examples out there that can help me with this? I have tried researching this but have not had any luck finding anything that could help me. Thanks in advance
question from:
https://stackoverflow.com/questions/65644867/having-videos-display-in-slideshow-type-fashion 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…