Video as Background in LayoutGrid

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
sieweb
 
 
Posts: 144
Joined: Fri Oct 20, 2017 8:07 pm

Video as Background in LayoutGrid

Post by sieweb »

Hi, I have set a video as Background in a LayoutGrid.
Is it possible somehow to let the video play just once without repeating?
horst
User avatar
Pablo
 
Posts: 23400
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Video as Background in LayoutGrid

Post by Pablo »

There is no option for this, but if you use a YouTube video then you can try to add
&loop=0
in the video URL.
sieweb
 
 
Posts: 144
Joined: Fri Oct 20, 2017 8:07 pm

Re: Video as Background in LayoutGrid

Post by sieweb »

Pity, it is no yt video but a local graphic design one not suited for a yt upload. As a looping video distracts too much from the actual content I will not do.
horst
User avatar
wwonderfull
 
 
Posts: 1582
Joined: Fri Aug 21, 2020 8:27 am
Contact:

Re: Video as Background in LayoutGrid

Post by wwonderfull »

sieweb wrote: Sun Aug 13, 2023 7:38 am Pity, it is no yt video but a local graphic design one not suited for a yt upload. As a looping video distracts too much from the actual content I will not do.
horst
I think other than default features custom scripts maybe needed. If you need any scripts then you can contact if needed. It has been tested and I think already possible.
sieweb
 
 
Posts: 144
Joined: Fri Oct 20, 2017 8:07 pm

Re: Video as Background in LayoutGrid

Post by sieweb »

wwonderfull wrote: Sun Aug 13, 2023 7:56 am ... then you can contact if needed. ...
Thank you. I have to discuss with the customer, it is his decision :D
horst
User avatar
BaconFries
 
 
Posts: 5933
Joined: Thu Aug 16, 2007 7:32 pm

Re: Video as Background in LayoutGrid

Post by BaconFries »

@sieweb are you using any other object on the page that is using jquery? if so you can try the following insert this using Page HTML Between the head <head></head> tags* Note you will also need to change #video to the id of you video for it to work. As mentioned you will need jquery on page to work.

Code: Select all

<script>
$(document).ready(function() {
  // set this variable to the number of times you like to loop the video
  var loop = 1; 
  // this event will be invoked when the media has reached the end
  $('#video').on('ended', function() {
    // check if we should replay the media
    if(loop--) {
      // replay the video
      this.play();
    }
  });
});
</script>
If you aren't using jquery from within the program then it is possible to call it directly from jquery CDN I can give you the url if required...
sieweb
 
 
Posts: 144
Joined: Fri Oct 20, 2017 8:07 pm

Re: Video as Background in LayoutGrid

Post by sieweb »

Another learning curve :D :
I am using a third party cookie alert that is using jquery. So, ist should do.
I have tried to use animation so far, but seem not to be very elegant.
horst, and a big thank you.
sieweb
 
 
Posts: 144
Joined: Fri Oct 20, 2017 8:07 pm

Re: Video as Background in LayoutGrid

Post by sieweb »

BaconFries wrote: Sun Aug 13, 2023 8:47 am ... you will also need to change #video to the id of you video ...
Problem: the Background (video) of the Lyoutgrid has no ID of it's own.
User avatar
BaconFries
 
 
Posts: 5933
Joined: Thu Aug 16, 2007 7:32 pm

Re: Video as Background in LayoutGrid

Post by BaconFries »

Sorry for not getting back sooner. Without a id for the video then this will not work. It may be that it is not possible see the following reply from Pablo on a similar question. Perhaps wwonderfull can share his solution here to that it will benefit all who have this requirement for a video.
viewtopic.php?p=470245
Post Reply