1

I've searched a lot on how to enable video autoplay with sound works in the html.

The thing is, when the autoplay is followed by muted attribute, the autoplay works just fine.

I have this video, and was suppose to autoplay, without user interaction(controls) and with sound on.

//start condition (jquery)

    //$('video').removeAttr('muted');
    
//end condition
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<div>
  <video class="childhood-img" muted="muted" autoplay="autoplay" loop="loop" playsinline="playsinline" type="video/mov" src="https://www.youtube.com/watch?v=MDLn5-zSQQI" >
  </video>
</div>

My dout is, how can enable autoplay, with sound on and without controls abritute?

Bumboobee
  • 31
  • 1
  • 11
  • Does this answer your question? [Autoplay Video with Sound](https://stackoverflow.com/questions/65405988/autoplay-video-with-sound) – Camelopardalus Jun 21 '22 at 14:30
  • I tried to implement the trick from **[here](https://stackoverflow.com/questions/65405988/autoplay-video-with-sound)**, but did not work – Bumboobee Jun 21 '22 at 15:37

1 Answers1

0

Having autoplay with sound is not possible anymore without an user interacting with the page. Browser vendors disabled this feature because it annoyed a lot of people and it was not safe in working environments.

Interesting ressource: https://jamonserrano.github.io/state-of-autoplay/

JBS
  • 993
  • 5
  • 11