codepo8 / slide-show

A full screen slide show for images and videos
https://codepo8.github.io/slide-show/slideshow.html
31 stars 15 forks source link

Videos only play when I interact with the slideshow #1

Open masilli opened 3 years ago

masilli commented 3 years ago

Hi! This is really good, thanks for it... I can't get the videos to autoplay. It only plays when I interact with the buttons, otherwise it's paused in the first frame. Do you know a way to autoplay videos as the slideshow goes, without having to interact with it?

mossroy commented 2 years ago

If you're using Chrome (or another Chromium-based browsers), it's probably because it now blocks autoplay by default. I managed to solve that by setting the video element as "muted".

Source: https://developer.chrome.com/blog/autoplay/

My videos don't have sound so it's not an issue for me. If having the sound is needed, it's probably necessary to add a button somewhere to let the user activate the sound