-
AuthorPosts
-
February 15, 2018 at 2:54 am #912572
Hi,
Is it possible to Autoplay and mute self hosted video on page load
video is located here – http://wsmsnyc.org/home/community/
February 16, 2018 at 7:09 am #913150Hey navindesigns,
Thank you for using Enfold.
Please try to use script in the functions.php file.
add_action('wp_footer', 'ava_custom_script'); function ava_custom_script(){ ?> <script type="text/javascript"> (function($) { $(window).load(function() { $('.mejs-overlay-button').trigger('click'); $('.mejs-mute button').trigger('click'); }); })(jQuery); </script> <?php }
Best regards,
IsmaelFebruary 17, 2018 at 6:14 am #913497I am trying to add it but i already have a other lines in my functions.php and I am getting an error when I add it.
Can you add this new code in it for me. I will post my current functions.php lines in the private content.
Thanks!
February 17, 2018 at 8:19 am #913564Hi navindesigns,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look? Which error are you getting?
Best regards,
VictoriaFebruary 17, 2018 at 4:53 pm #913678Please see below
February 18, 2018 at 7:55 am #913808Hi navindesigns,
Credentials did not work for me. Could you please update the credentials?
Best regards,
VictoriaFebruary 18, 2018 at 7:59 am #913811Sorry see below
February 18, 2018 at 9:16 am #913833Hi navindesigns,
You already have ava_custom_script function, that’s why you’re getting the error. You can rename the function given to you by Ismael and it should work fine.
add_action('wp_footer', 'av_mute_tab'); function av_mute_tab(){ ?> <script type="text/javascript"> (function($) { $(window).load(function() { $('.mejs-overlay-button').trigger('click'); $('.mejs-mute button').trigger('click'); }); })(jQuery); </script> <?php }
If you need further assistance please let us know.
Best regards,
Victoria- This reply was modified 6 years, 9 months ago by Victoria.
February 18, 2018 at 8:03 pm #913995perfect. thanks
that work
I assume on mobile, it cannot auto play.
February 18, 2018 at 9:56 pm #914036Hi,
We are afraid not :-(
Please fee free to create a new ticket if you need something else.Best regards,
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.