9

I was trying to auto-play videos in ThemePunch Slider Revolution 5.4.2 when I ran into the following JavaScript error (in Google Chrome):

Unmuting failed and the element was paused instead because the user didn't interact with the document before. revolution.extension.video.min.js:7

Wasim Sayyed
  • 591
  • 10
  • 23
Pholoso Mams
  • 467
  • 1
  • 5
  • 19

2 Answers2

15

OP's answer:

After banging my head against the internet for 3 days I decided to open the script in which the error was raised, namely:

revolution.extension.video.min.js

and I removed the entire line 7 which is the following code:

c=void 0!=c&&"mute"!=c?parseFloat(c)/100:c,d||(!0===e.globalmute?q.muted=!0:q.muted=!1,c>1&&(c/=100),"mute"==c?q.muted=!0:void 0!=c&&(q.volume=c)),a.addClass("videoisplaying");

This resolved my issue!

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
4

You don't have to edit plugin itself its dangerous.

Revolution slider API can be used to force play the video on page load

revapi1.bind("revolution.slide.onvideostop",function (e,data) { var player = data.video; player.play(); });

Add this in Slider Settings > Custom JavaScript

For information about policy changes for multimedia playback check https://www.themepunch.com/faq/video-audio-changes-safari-chrome/

Wasim Sayyed
  • 591
  • 10
  • 23