Delay in Video Scaling/Loading on Mobile
-
Hi everyone,
I’ve set a background video in a row and configured it to be the height of the browser. On desktop, everything works perfectly. However, on mobile, there’s a brief moment where the video initially loads in its original aspect ratio before scaling to fit the browser height.
Is there a way to make the video load directly in its scaled version, set to the browser height, without the delay?
Thanks in advance!
-
i always need a link to where the problem is, please read this "when you post"
-
-
hey i cant really confirm this
which phone and browser are u using?
which versions? -
can you post a screengrab / recording of the issue happening?
i cant reproduce it -
for me the video loads and shows up without doing any resizing even for ios 15
-
Here’s another test with a smaller file size. The issue remains the same, so I don’t think file size is the problem.
https://dev.rickangenent.nl/videotest-1/
See screenshots:
-
can you try this css
video{ display: none; } video.loaded{ display: block; }
i cant replicate the issue but maybe this css fixes it
Enter this css in "lay options" -> "custom css & html" -> "custom css"
-
video{
opacity: 0!important;
}
video.loaded{
opacity: 1!important;
}and if you try this code above instead?
-
@arminunruh Would you mind thinking this through with me one more time?
On desktop, everything works perfectly. However, on mobile, there's a brief moment where the video initially loads in its original aspect ratio before it scales to fit the browser height.
I’m wondering if there’s a way to make the video load directly in its scaled version – set to the browser height – without that initial delay or shift.
Strangely, about 1 out of every 15 refreshes on my mobile, it does load just the way I want it to: a quick white flash, then the video appears perfectly scaled. That’s exactly the behavior I’d like to see by default.
Do you have any idea what might be causing this inconsistency? I'd really appreciate your help!
-
I've made a screen recording and during testing it clearly shows what I described.
The second time I reload the page, you can see exactly the behavior I want: a quick white flash, then the video appears perfectly scaled.
But on the third reload, it malfunctions again.
Here’s my screen recording for reference.
I'd really appreciate your help Armin.
-
Hey, what is your iOS version? Seeing that your browser bar is at the top, it may be a year or two old. I'll have to check with this specific iOS version.
-
Can you go to Layer Options, then at the top click on the Lazy Loading section button?
If you have the latest Laytheme version, now there is a setting to enable or disable lazy loading for videos.
Can you disable it? This will probably do nothing but can be worth a try.
-
What’s interesting is that I’ve seen the same behavior on newer devices as well – for example, on my wife’s iPhone, which she bought new in December. I’m not exactly sure which iOS version she’s on, but I’ll check that too. So I’m not convinced it’s strictly tied to an older iOS version.
Let me know if there's anything else I can test or try – happy to help troubleshoot further.
-
hey
i tested ios 15 and 14 but couldnt see this issue.
with the next lay theme update, go to lay options, other section,
and enable this:this might help.
You could also try to remove the opacity of the row background. Meaning, put the opacity slider to its original position.
Maybe iOS has an issue with that CSS filter that is applied to the video.
I also code custom websites or custom Lay features.
💿 Email me here: 💿
info@laytheme.com
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it