I’ve read the past help requests and saw the php code suggested to add to functions.php to solve the issue.
But for me the code doesn’t seem to be doing anything.
add_action(‘wp_footer’, function () { ?>
<script>
jQuery(function() {
if (!wp || !wp.hooks) return;
wp.hooks.addFilter(‘presto.playerSettings’, ‘pp-set-aspect-ratio’, function(settings) {
if (settings.id === 497 ) { // this is the video id of that first video
settings.ratio = ‘9:16’;
}
return settings;
});
});
</script>
<?php });
I’ve also tried the other code:
add_action(‘wp_footer’, function () { ?>
<script>
jQuery(function() {
if (!wp || !wp.hooks) return;
wp.hooks.addFilter(‘presto.playerSettings’, ‘pp-set-aspect-ratio’, function(settings) {
settings.ratio = ’16:9′;
return settings;
});
});
</script>
<?php });
I’m not sure what im doing wrong and would appreciate some assistance.
I’ve changed the settings.id to the correct media.
I’ve disabled other plugins.
and still getting no results, what am i missing?
]]>These header videos, or background videos, don’t play on mobile devices…and it’s annoying.
The theme I’m using (Noha) replaces the videos with images by default. Would anyone know of any way to override this within the theme’s code or via a plugin?
Any help greatly appreciated!
Website: T Studio
]]>I want to thank @nko for this cool plugin. It really helped me to make background videos.
Also I want to ask for help. Could you tell me how to make different videos on mobile and different on Desktop/Tablet versions automatically? Because now there is only option for disable/enable video on mobile devices. I need an option for disable video on desktop or tablet…
Hope someone will help…
]]>which way to start?
It already worked on my site, but browser engineers keep changing those things ….
]]>Is it the video size I need to change or a setting on WordPress DIVI that tells the video to resize and show the full video?
Thanks for your help…
]]>After an elementor update my background video stopped working on mobile. Nothing is visible. The same video is visible on desktop. I have used the following code (and that used to work before the update).
.elementor-background-video-container.elementor-hidden-phone {
display: block !important;
}
I noticed in elementor you can now toggle ‘play on mobile’ in the background video options. Turned that on, still not showing.
Do you have any idea how to get my video back?
Thanks so much in advance!
]]>After an elementor update my background video stopped working on mobile. Nothing is visible. The same video is visible on desktop. I have used the following code (and that used to work before the update).
.elementor-background-video-container.elementor-hidden-phone {
display: block !important;
}
I noticed in elementor you can now toggle ‘play on mobile’ in the background video options. Turned that on, still not showing.
Do you have any idea how to get my video back?
Thanks so much in advance!
]]>Hope you can help me out.
]]>