最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - WordPress Revolution Slider: Unmuting failed and the element was paused instead because the user didn't int

programmeradmin0浏览0评论

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):

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

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 1
  • thanks a lot, you are a hero! – riza Commented Aug 2, 2018 at 10:58
Add a comment  | 

2 Answers 2

Reset to default 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!

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/

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论