Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WordPress Revolution Slider: Unmuting failed and the element was paused instead because the user didn't interact with the document before

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

like image 356
Pholoso Mams Avatar asked Jul 02 '18 08:07

Pholoso Mams


2 Answers

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!

like image 140
Eric Aya Avatar answered Oct 21 '22 12:10

Eric Aya


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/

like image 30
Wasim Sayyed Avatar answered Oct 21 '22 13:10

Wasim Sayyed