Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #912572

    Hi,

    Is it possible to Autoplay and mute self hosted video on page load

    video is located here – http://wsmsnyc.org/home/community/

    #913150

    Hey 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,
    Ismael

    #913497

    I 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!

    #913564

    Hi 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,
    Victoria

    #913678

    Please see below

    #913808

    Hi navindesigns,

    Credentials did not work for me. Could you please update the credentials?

    Best regards,
    Victoria

    #913811

    Sorry see below

    #913833

    Hi 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, 10 months ago by Victoria.
    #913995

    perfect. thanks

    that work

    I assume on mobile, it cannot auto play.

    #914036

    Hi,

    We are afraid not :-(
    Please fee free to create a new ticket if you need something else.

    Best regards,
    Basilis

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.