Answer the question
In order to leave comments, you need to log in
Is there a workaround for audio tag in html for google chrome?
After the Google Chrome policy changed (a couple of years ago), the browser stopped playing music in the background of the site (audio tag using autoplay). But I found those who managed to get around it.
For example, yesterday I came across a site that can still play music in the background:
https://starper55plys.ru/html/mysik-site/
There was already a similar topic: How to make autoplay work?
It is recommended to add the muted attribute for the audio tag - I didn’t really understand how to do this, because I didn’t find any documentation about the muted attribute.
They also suggested making it in the form of a video tag:
<video id="myaudio" controls="" loop="" autoplay="" name="media" preload="auto" hidden>
<source src="music.mp3" type="audio/mp3">
</video>
<script>
var audio = document.getElementById("myaudio");
audio.volume = 0.2;
</script>
<iframe hidden src="music.mp3" allow="autoplay" type="audio/mpeg">
Answer the question
In order to leave comments, you need to log in
Try with JavaScript
Here - https://javascript.ru/blog/gordon-freeman/fonovaya...
Somehow you searched badly
https://www.google.com/search?q=html5+audio+muted&...
Upload your music to YouTube and embed the video on the site with autoplay enabled.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question