How can I make sure that the background video in the Layout grid cell is played only once

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
User avatar
VictorKrs
 
 
Posts: 308
Joined: Sun May 17, 2020 8:08 pm

How can I make sure that the background video in the Layout grid cell is played only once

Post by VictorKrs »

Hello!
I have two questions about playing videos on the website.:
1. How can I make sure that the background video in the Layout grid cell is played only once when the page loads? If there is a solution to tie the start of playback to some event (hover mouse and so on), then that would be ideal.
2. When using the "Video" object, the video will not be played when the "Show controls" option is disabled. What could be the problem?

I will be grateful for your help!
User avatar
Pablo
 
Posts: 23230
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: How can I make sure that the background video in the Layout grid cell is played only once

Post by Pablo »

By design, the background video will play in a loop. There is no option to play it once.

Make sure the video has no audio otherwise it will not play automatically.
User avatar
VictorKrs
 
 
Posts: 308
Joined: Sun May 17, 2020 8:08 pm

Re: How can I make sure that the background video in the Layout grid cell is played only once

Post by VictorKrs »

Thanks for the quick reply!

Video without audio doesn't work either (unfortunately).
I tried Plyr and playback without controls doesn't work in it either.
Link to the project: https://drive.google.com/file/d/1QMobzI ... sp=sharing
User avatar
Pablo
 
Posts: 23230
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: How can I make sure that the background video in the Layout grid cell is played only once

Post by Pablo »

The browser error console indicates that there is an issue with the video file. It may be the wrong format.

Note that this has nothing to do with WWB.

See also: the note about 'autpolay":
https://wysiwygwebbuilder.com/add_video.html
User avatar
VictorKrs
 
 
Posts: 308
Joined: Sun May 17, 2020 8:08 pm

Re: How can I make sure that the background video in the Layout grid cell is played only once

Post by VictorKrs »

OK. Thanks for the clarifications! I'll try to change the video codec settings.
User avatar
BaconFries
 
 
Posts: 5868
Joined: Thu Aug 16, 2007 7:32 pm

Re: How can I make sure that the background video in the Layout grid cell is played only once

Post by BaconFries »

1. How can I make sure that the background video in the Layout grid cell is played only once when the page loads? If there is a solution to tie the start of playback to some event (hover mouse and so on), then that would be ideal.
As mentioned by Pablo there is no option for the video to only play once and not loop. With this said it may be possible if you were to use the likes of a YouTube video then you can try to add &loop=0 to the videos URL. Regarding the use of "Hover" or "Mouse Over" this would only work in "Desktop" and not the likes of touch enabled devices such as mobiles/tablets etc as they do not use a mouse and they require the user to actually tap the screen to then start/stop the video so adding a overlay icon such as a play button Over the video tells the user to tap or place pointer (mouse over)
. When using the "Video" object, the video will not be played when the "Show controls" option is disabled. What could be the problem?
As as mentioned please check the encoding of the video.
User avatar
VictorKrs
 
 
Posts: 308
Joined: Sun May 17, 2020 8:08 pm

Re: How can I make sure that the background video in the Layout grid cell is played only once

Post by VictorKrs »

Hello!

Thanks a lot for the clarifications, BaconFries!
User avatar
VictorKrs
 
 
Posts: 308
Joined: Sun May 17, 2020 8:08 pm

Re: How can I make sure that the background video in the Layout grid cell is played only once

Post by VictorKrs »

The problem is solved!
Everything is working perfectly!
The cause of the problem:
I deleted the audio track in the video editor, but when exporting the project, I did not specify to the video codec that I should export only video. As a result, the video was exported with an empty audio track and, accordingly, the browsers did not play the video.
Thank you all for your comments on my question!
User avatar
crispy68
 
 
Posts: 2995
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: How can I make sure that the background video in the Layout grid cell is played only once

Post by crispy68 »

@Victor,

The only way to make it play only once and stop looping is you would need to open the published html file and find the code for the video (look something like this):

Code: Select all

<div id="LayoutGrid1-video"><video src="Carousel.mp4" autoplay loop muted playsinline></video></div>
and remove the word 'loop' from the code and resave it. Yes, you will need to do this every time you publish the page.
User avatar
VictorKrs
 
 
Posts: 308
Joined: Sun May 17, 2020 8:08 pm

Re: How can I make sure that the background video in the Layout grid cell is played only once

Post by VictorKrs »

Hello, crispy68!

Thanks for the recipe! Everything is working fine.
In the Suggestions/Improvements section, I will post a suggestion for implementing this without manually correcting the page code (which is certainly not convenient)...

Sincerely, Victor!
Post Reply