Topic: Carousel with Random videos from folder

Nicolò Brescia free asked 6 years ago


Hello guys and thanks in advance for the replies. I'm quite new to bootstrap and I'd like to create a Carousel made of 3 videos, only that these 3 videos are randomly taken from a video folder with multiple files every time that the page is reloaded Is there a way to do this or am I too ambitious? Of course the same video should not appear twice or thrice in the same carousel

Mikołaj Smoleński staff answered 6 years ago


Hi Nicolò Brescia, Loading random elements from folder is possible, but You need to use PHP (it's the easiest way). Firstly, You should read that article: https://stackoverflow.com/questions/1761252/how-to-get-random-image-from-directory-using-php Of course You need to change elements from images to videos. Then You need to push them into this:

<source src="..." type="video/mp4" /> Regards


Nicolò Brescia free commented 6 years ago

thank you!! I'll try!


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags