1. SP Page Builder 3.x
  2. Wednesday, 29 April 2020
I have the background video set to "loop" but it is not looping. My video is a local video. Not YouTube, Vimeo, etc. Ideas?
Accepted Answer
The solution is actually more simple;

Line 339 needs changing to - it literally needs only a space added between "'.$video_loop.''.$video_params.'":


$html .= '<video class="section-bg-video" autoplay muted playsinline '.$video_loop.' '.$video_params.''.($lazyload ? ' data-poster="'.$video_poster.'"' : ' poster="'.$video_poster.'"').'>';
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # Permalink
Responses (12)
This problem still exists in the latest update.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 1
@Mohammed Ahmed thanks for the solution worked like a charm
تسلم
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 2
@Al Mamun - asked me to mention him on this thread.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 3
If you want all videos to loop, quick edit required to this file:

/components/com_sppagebuilder/layouts/row/start.php


Change line 339 from:

$html .= '<video class="section-bg-video" autoplay muted playsinline '.$video_loop.''.$video_params.''.($lazyload ? ' data-poster="'.$video_poster.'"' : ' poster="'.$video_poster.'"').'>';


to:

$html .= '<video class="section-bg-video" autoplay muted playsinline loop '.$video_params.''.($lazyload ? ' data-poster="'.$video_poster.'"' : ' poster="'.$video_poster.'"').'>';


You'll find the local video loops forever (note this overrides your settings I think).
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 4
I'm not sure why this is marked as resolved.

The attribute that is rendered by SP Page Builder is wrong.

SP Page Builder renders the below:

<video class="section-bg-video" autoplay="" muted="" playsinline="" looploop="" poster="/forums/poster.jpg"><source src="/forums/video.mp4" type="video/mp4"></video>


The generated markup just needs to be fixed for stored MP4s from "looploop" to just "loop":

<video class="section-bg-video" autoplay="" muted="" playsinline="" loop="" poster="/forums/poster.jpg"><source src="/forums/video720.mp4" type="video/mp4"></video>


It's an obvious bug, which *did* work in older 3.6.x versions of SP Page Builder.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 5
Can you not add the attribute?

https://www.w3schools.com/tags/att_video_loop.asp

I use local mp4s too as youtube/vimeo load a tonne of extra resources that affect pagespeed.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 6
Sorry there is no feature like this :)
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 7
Ah! Only YouTube and Vimeo. I see. No option to loop mp4's on our own server? At all?
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 8
But its ok in our end
https://prnt.sc/s7tr0u
Did you try the youtube video?
This loop option is available only for these two options
YouTube/Vimeo
Thank you
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 9
I already did that. I chose an mp4 on my server. The video does not loop even though I have it set to loop in the settings provided.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 10
HI,
Please see the screenshot below:
https://prnt.sc/s7sum4
You have to choose any one of these
Thank you
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 11


There are no replies made for this post yet.
Be one of the first to reply to this post!


This forum is archived

This forum has been archived. Please use JoomShaper official support system.