Autoplay attribute doesn't work

<video controls autoplay src="videos/ocean.mp4"></video>

When i try to render the main page, autoplay doesn’t start, even if i insert the video attribute “autoplay”. i am using chrome as a browser

So i have just set the muted attribute and it works. But why is it working? I mean. Why should i use the muted attribute to let it work? I’ll try to run it in a different browser as well anyway.
Thanks

Because that’s the way it’s implemented. Autoplay can be annoying and a security issue.

It actually works, but the browser blocks the autoplay for security purposes.
You could make a white list for the website you working on it throw the settings.