Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

背景音乐问题 #31

Open
huangxiangsheng opened this issue Apr 8, 2020 · 3 comments
Open

背景音乐问题 #31

huangxiangsheng opened this issue Apr 8, 2020 · 3 comments

Comments

@huangxiangsheng
Copy link

huangxiangsheng commented Apr 8, 2020

想加个mp3背景音乐,能自动播放!--试过在Love.html目录下加一个love.mp3,但是不行,没反应

1 查过百度,不行(似乎说现在版本的Google浏览器、firefox都不支持自动播放)

2 查过Google 试过不少方法,依然没有反应(说是改什么隐私。。。似乎太麻烦了把)

3 可能是我没有系统的搞过html(基础问题,)

4 谁有办法呢?(想求帮忙,有人可以给个简单的例子吗,能运行的,我再模仿,跟着改)

@xiongmaoyi
Copy link

可对一开始的canvas添加点击事件,就能播放了

$('#canvas').click(function(){
document.getElementById("mp3vd").play();
});

@knightzhong
Copy link

我也有相同的问题,我试了二楼的方法在body加入了这个内容但是还是不行

@1022739387
Copy link

1022739387 commented Jun 10, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants