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
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):
Share Improve this question edited Sep 14, 2018 at 9:21 Wasim Sayyed 6111 gold badge10 silver badges23 bronze badges asked Jul 2, 2018 at 8:07 Pholoso MamsPholoso Mams 4771 gold badge7 silver badges20 bronze badges 1Unmuting failed and the element was paused instead because the user didn't interact with the document before. revolution.extension.video.min.js:7
- thanks a lot, you are a hero! – riza Commented Aug 2, 2018 at 10:58
2 Answers
Reset to default 15OP'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!
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/