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

    Viemo video is not working in fullscreen slider in version 4.6.3.1. (autoplay). Youtube plays fine. (but client has all videos on Vimeo). How can I fix this?
    See sample page in private link.

    • This topic was modified 4 years, 12 months ago by stuedal.
    #1155792

    Hey stuedal,

    I’m getting a 404 error on the page you linked to. Please send us a temporary WordPress admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #1155947

    The link should be working, works fine here. I have created an admin account for you. see login details below

    #1156258

    Hi,

    Thanks for the login details, though it’s requesting authentication after logging in as well. We don’t have access to the email you have used unfortunately, could you post the extra authentication here in private in the thread please?

    Best regards,
    Rikard

    #1156336

    See below

    #1157139

    Hi,

    Thank you for the update.

    Have you tried to mute the video, or disable its audio? We found this error in the console when we check the page that contains the video slider.

    NotAllowedError: The play method is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
    

    According to the following discussion, we have to add the “allow” attribute in the iframe tag to enable autoplay for vimeo videos.

    // https://github.com/vimeo/player.js/issues/389

    Please try this script in the functions.php file.

    function ava_iframe_parameters(){
    ?>
    <script>
    (function($){
    	$(document).ready(function() {
    		function avia_iframe_parameters(container)
    		{
    			var iframe 	= jQuery('iframe[src*="vimeo.com"]', container);
    
    				iframe.each(function()
    				{
    					$(this).attr('allow', 'autoplay');
    				});
    		}
    
    		avia_iframe_parameters('body');
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'ava_iframe_parameters');
    

    This will add the attribute in the iframe tag.

    Best regards,
    Ismael

    #1157180

    Nope, did not work

    #1158018

    Hi,

    Thank you for the update.

    The video is now playing automatically on page load, and we are not seeing the “NotAllowedError” in the console anymore. We viewed the site in Firefox on Windows 10. Where are you testing it? Please make sure that cache is removed prior to checking the page.

    Best regards,
    Ismael

    #1158093

    Not auto-playing, have tested in Chrome, Safari and Firefox – all on Mac OS

    YouTube is auto playing on all browsers, just not Vimeo. Same goes with this site; https://solve.as/om_oss/
    This was working fine until recently

    #1158973

    Hi,

    Thank you for the update.

    In the “solve/as” site, this is the what’s in the browser console.

    Autoplay is only allowed when approved by the user, the site is activated by the user, or media is muted.
    

    And we didn’t notice it before, but the same warning shows up in the “villmarksfilm” site, so we edited the video slide and muted it. The video is now playing automatically on page load. Please don’t forget to remove the browser cache before testing the page again.

    The media file doesn’t autoplay when audio is enabled because of the recent changes in the browsers’ autoplay policy.

    // https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
    // https://support.mozilla.org/en-US/kb/block-autoplay

    Chrome’s autoplay policies are simple:

    Muted autoplay is always allowed.
    Autoplay with sound is allowed if:
    User has interacted with the domain (click, tap, etc.).
    On desktop, the user’s Media Engagement Index threshold has been crossed, meaning the user has previously played video with sound.
    The user has added the site to their home screen on mobile or installed the PWA on desktop.
    Top frames can delegate autoplay permission to their iframes to allow autoplay with sound.

    Best regards,
    Ismael

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