Page 1 of 1
How can I make sure that the background video in the Layout grid cell is played only once
Posted: Wed Mar 05, 2025 1:08 pm
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!
Re: How can I make sure that the background video in the Layout grid cell is played only once
Posted: Wed Mar 05, 2025 1:39 pm
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.
Re: How can I make sure that the background video in the Layout grid cell is played only once
Posted: Wed Mar 05, 2025 2:41 pm
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
Re: How can I make sure that the background video in the Layout grid cell is played only once
Posted: Wed Mar 05, 2025 2:47 pm
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
Re: How can I make sure that the background video in the Layout grid cell is played only once
Posted: Wed Mar 05, 2025 3:12 pm
by VictorKrs
OK. Thanks for the clarifications! I'll try to change the video codec settings.
Re: How can I make sure that the background video in the Layout grid cell is played only once
Posted: Wed Mar 05, 2025 3:59 pm
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.
Re: How can I make sure that the background video in the Layout grid cell is played only once
Posted: Thu Mar 06, 2025 7:49 am
by VictorKrs
Hello!
Thanks a lot for the clarifications, BaconFries!
Re: How can I make sure that the background video in the Layout grid cell is played only once
Posted: Thu Mar 06, 2025 11:52 am
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!
Re: How can I make sure that the background video in the Layout grid cell is played only once
Posted: Fri Mar 07, 2025 1:02 am
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.
Re: How can I make sure that the background video in the Layout grid cell is played only once
Posted: Wed Mar 12, 2025 7:54 am
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!