Reputation: 31
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?
Upvotes: 1
Views: 5147
Reputation: 1065
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/
Upvotes: 0