最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

html - How to prevent a browser from blocking an audio autoplay on a website? - Stack Overflow

programmeradmin2浏览0评论

I'm creating my personal website with 90s and early 2000's style. I would like to add an autoplay and looping bgm on it when the website loaded. However, when I do it, the browser blocks the audio and I need to manually allow the permission on the website. How would I do it without the browser audio autoplay blocking?

<audio src="./audios/background/childhood2.mp3" autoplay loop></audio>
发布评论

评论列表(0)

  1. 暂无评论