Revolution Slider will not auto play Vimeo

Hello. Our web site seems to have stopped auto playing content from vimeo. It had been working fine for a long time. We recently had someone update Wordpress and our plugins, and we think it was working when they were done. However shortly afterward, it stopped working. Although every now and then it does seem to work.

In Chrome in the Console we get the following:

Uncaught (in promise) Error: play() failed because the user didn’t interact with the document first. https://goo.gl/xX8pDD
at player.js:2
at Array.forEach ()
at b (player.js:2)
at e (player.js:2)

We have tried the following:

  • Cleared nginx cache
  • Cleared apache pagespeed cache
  • Disabled apache pagespeed
  • Cleared the X Style Cache
  • Cleared the browser’s cache
  • Updated X and Cornerstone
  • Increased the php max memory from 128M to 256M

We did find that if in Chrome, we go to chrome://flags/#autoplay-policy and change the setting to “No user gesture is required”, and then restart Chrome, the video seems to auto start as it should. But we can’t expect our users to have to do that.

Not sure what else to try. Any ideas? Thanks!

Hi There,

I did see the javascript error but the video is still autoplay:

Did you try adding the &autoplay=1 to the source of your vimeo URL.

Something like this:

<div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/286820484?autoplay=1" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>

Please also follow up the troubleshooting steps below:

  1. Ensure everything is up to date according to our version compatibility list here. Please follow the best practices when updating your theme and plugins. Click here for more information.
  2. If you’re using a CDN(ex: CloudFlare), please clear the CDN’s cache and disable optimization services. For the CloudFlare you also need to follow the steps below besides the developer mode: https://xthemetips.com/using-cloudflare-rocket-loader-with-x-pro-and-x5/928/1
  3. Test for a plugin conflict. You can do this by deactivating all third-party plugins, and see if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.
  4. Remove custom CSS and Javascript from the options or Child Theme and test the case.
  5. Switch to the parent theme to check if the issue persists.
  6. Turn off all the cache plugins.

Let us know how it goes!

Hi there. Thank you for your response! I’m curious to know if you tried refreshing a few times to see if it started each time. It does seem to play for us every now and then.

The video is setup as the background in Revolution Slider. The only option I see there is to set the Vimeo Video ID and Cover Image. I don’t see a way to add &autoplay=1 to a url.

As far as troubleshooting:

  1. We are running:
  • X 6.4.6.
  • Cornerstone 3.4.6
    (I notice that the above are a few revisions past what is officially supported. Do you have a recommended way to downgrade?)
  • Slider Revolution 5.4.8.1
  1. We’re not using a CDN
  2. I will work on doing this later tonight
  3. There is no child theme. I will check for custom CSS / Javascript.
  4. There is no child theme.
  5. There are no cache plugins.

Thanks in advance for any additional help. I will work on testing for a plugin conflict and search for custom CSS / Javascript and let you know how it goes. Thank you!

Hello Paul,

​To assist you better with this issue, would you mind providing us the url of your site with login credentials so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

To do this, you can create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

To know how to create a secure note, please check this out: https://theme.co/apex/forum/t/how-to-get-support/288

Thank you.

Updated the secure note above. Thanks!

Hello Paul,

I have logged in and edit your slider. I made some changes as indicated by Thai.
The video is autoplaying now. Please allow a few seconds for the video to load before it autoplay.

Please check your site now.

Hello. Thanks so much for taking a look. I don’t see the video auto playing though. I know sometimes it does work, but most of the time it does not. Can you please explain what change you made? Thank you!

Hey Paul,

I’m not sure what Ruenel did. Upon checking, I didn’t see the &autoplay=1 added in the Arguments Vimeo field.

I’ve tested with and without the autoplay argument though and your video still plays.

I’ve tried reloading several times and it plays all the time. It just takes too long to load maybe due to the size of the video. Please try a smaller file size video and see if the issue persist.

Thanks.

Thank you for taking a look. I really appreciate it!

I still don’t seem to be able to get the video to play.

When you say that it takes too long to load, how long are we talking? 10 seconds? 1 minute? I have left the page open for a few minutes and it does not seem to load for me. Also, do you get the “play() failed” error in the console when it works for you?’

Thanks again so much for your help!

When I loaded just now, it just took like 4 seconds and the video played even I get the play() error in the console.

It looks like there’s something in your browser conflicting. Please check if you have browser extensions and deactivate them to test.

Thanks.

Thanks again for checking things. It’s very strange. I created a new profile in Chrome. So everything should be default and there should be no extensions. Then Iwent to the site. First time the video loaded properly. Then I refreshed the page, and it did not load. I will see if I can try a different PC. Please let me know if you have any other suggestions. Thanks!

Hello Paul,

I am pretty sure that I added the &autoplay=1 in the Vimeo argument field. When I refresh the page, it seems that the settings in not being saved.

Since you have purchased a separate license for Revolution Slider, I would highly recommend that you contact the creators of the plugin directly. This issue might be a bug or something and I think they must be informed or be able to investigate this issue further. You may submit a ticket to their Support Desk from here: https://www.themepunch.com/support-center/?rev=rsb

Thank you for your understanding.

Unfortunately I was unable to get help from themepunch. But your observation of the option not being saved was very helpful! I was able to dig in the code and found a coding mistake. Specifically they save the information with an array index of video_arguments_vim but try to retrieve with video_arguments_vimeo. So I changed wp-content/plugins/revslider/admin/views/slide-editor.php to use video_arguments_vim.

Here is the diff:

--- slide-editor.orig.php       2018-12-21 11:31:56.631381944 -0500
+++ slide-editor.php    2019-01-19 00:35:27.189167865 -0500
@@ -214,7 +214,7 @@
 $video_start_at = RevSliderFunctions::getVal($slideParams, 'video_start_at', '');
 $video_end_at = RevSliderFunctions::getVal($slideParams, 'video_end_at', '');
 $video_arguments = RevSliderFunctions::getVal($slideParams, 'video_arguments', RevSliderGlobals::DEFAULT_YOUTUBE_ARGUMENTS);
-$video_arguments_vim = RevSliderFunctions::getVal($slideParams, 'video_arguments_vimeo', RevSliderGlobals::DEFAULT_VIMEO_ARGUMENTS);
+$video_arguments_vim = RevSliderFunctions::getVal($slideParams, 'video_arguments_vim', RevSliderGlobals::DEFAULT_VIMEO_ARGUMENTS);

 /* NEW KEN BURN INPUTS */
 $kbStartOffsetX = intval(RevSliderFunctions::getVal($slideParams, 'kb_start_offset_x', $def_kb_start_offset_x));

Once that was fixed, I was able to save the autoplay=1 in the Vimeo arguments field. And now it seems to work properly.

I don’t know if this is the same plugin that you or others use, but I thought I’d share my findings here in case it might help someone else.

I may have spoken too soon. It looks like there are still issues, but at least saving the vimeo options works now. :slight_smile:

Hi Paul,

I just checked and it auto plays, please check this

If you’re clearing your cache or first time loading the page, then it will have a delay before it plays. But it auto plays okay.

The error is originating from Vimeo API too and it’s something can’t be controlled outside Vimeo since it’s within an iframe. I’m afraid it can’t be fix if Vimeo itself is now ignoring the cross-iframe requests. Still, it works even with that error since autolay=1 is not javascript related.

Thanks!

Right. I see the same thing in Chrome. However, in Firefox it does not seem to work right now. I will try another PC. Thanks!

Sure, please let us know. This screenshot is from my Firefox.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.