Slideshow Addon - Video Background Doesn't Show On IOS Safari Browser - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Slideshow Addon - Video Background Doesn't Show On IOS Safari Browser

IP

Ivan Petrovic

SP Page Builder 4 years ago

Hi,

I set up slideshow addon to play local video in background. It works fine on all Windows and Android browsers, but it doesnt work on Apple devices! How can I fix this?

0
3 Answers
Anne
Anne
Accepted Answer
Support Agent 4 years ago #31777

Hello there,

This is not a problem of our product. This is a common problem for developers around the world. What would make it work background video on smartphones and in all browsers requires non-standard js tricks.

No to mention, if you google this subject, you will realize the scale of the problem. In addition, the companies Google and Apple have a policy prohibiting autoplay video for all new device models. In any case, use a video background is very bad for page speed load on mobile devices.

The best way is to completely abandon the background video on mobile devices.

Thanks!

0
IP
Ivan Petrovic
Accepted Answer
4 years ago #32568

Why are you working in support without providing any support!? If I wanted a funny answer I would post this question on 9gag.

So, if anyone needs this here is the (temporarily) solution :

CONS: It requires changing SP Page Bulder core file (I'm strongly against changing any core files) that will be replaced with every update (until someone in JoomShaper make this little change in code).

PROS: It allows playing background video from Slideshow addon on Safari browsers for IOS and MAC devices.

All you have to do is add 'playsinline' (and if wanted muted, autoplay and controls) attribute the correct way in components/com_sppagebuilder/assets/js/js_slider.js file.

Because the file is minified fastest way is to find and replace:

h.playsinline="playsinline";

with

h.setAttribute("playsinline","true");h.setAttribute("autoplay","true");

*and if needed add: h.setAttribute("controls","true"); and h.setAttribute("defaultMuted","true");

Empty cache and that's it.

I'm not a java programmer, so if anyone knows a better way please write here.

Note for JoomShaper support: This is not "non-standard js tricks" so please consider adding correct code in future updates.

0
G
gourou
Accepted Answer
4 years ago #32571

perfect Ivan, every time I see on this forum this kind of answer from support staff it drives me nuts !!!

0