1

I have found this solution here, it working for my system. But i got this issue in my wordpress website. They as suggesting to update Autoplay policy. I need to fix this on all computers. Any ideas?

Sridhar
  • 101
  • 2
  • 2
  • 5
  • I got the solution for muted videos with javascript code.. `jQuery(document).ready(function(){ jQuery(".video_class_name").prop('muted', true); });` – Sridhar May 10 '18 at 11:40
  • Possible duplicate of : https://stackoverflow.com/questions/51041580/muted-autoplay-video-shows-error-play-failed-because-the-user-didnt-interact – Zohid Sep 04 '18 at 09:01
  • Does this answer your question? [How to handle "Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first." on Desktop with Chrome 66?](https://stackoverflow.com/questions/49930680/how-to-handle-uncaught-in-promise-domexception-play-failed-because-the-use) – PolyGlot Sep 24 '20 at 14:44

1 Answers1

4

This may works. First mute the audio because browsers does not allow to auto play video with audio.

$(document).ready(function(){ 
    $(".video_class_name").prop('muted', true);
    $(".video_class_name")[0].play();
});