如何在 android 设备中自动播放音频?
How to autoplay audio in android device?
我知道 android 设备不支持自动播放音频。但是我遇到了一个网站,它可以自动播放 android 设备中的音乐。
http://kelvinh.studio/
谁能告诉我他是怎么做到的?
看起来它使用 pixi.js。
它有声音模块:https://github.com/pixijs/pixi-sound
在这里你可以看到一个自动播放的例子:
https://github.com/pixijs/pixi-sound/blob/master/examples/index.html
关于IOS:
Playing sound on iOS — in any browser — requires a physical user
interaction. This is a browser limitation, and internal A-Frame events
(like fusing cursors) do not count as interaction. Ways to deal with
this include using a Begin Experience button to start ambient music.
我知道 android 设备不支持自动播放音频。但是我遇到了一个网站,它可以自动播放 android 设备中的音乐。 http://kelvinh.studio/
谁能告诉我他是怎么做到的?
看起来它使用 pixi.js。
它有声音模块:https://github.com/pixijs/pixi-sound
在这里你可以看到一个自动播放的例子:
https://github.com/pixijs/pixi-sound/blob/master/examples/index.html
关于IOS:
Playing sound on iOS — in any browser — requires a physical user interaction. This is a browser limitation, and internal A-Frame events (like fusing cursors) do not count as interaction. Ways to deal with this include using a Begin Experience button to start ambient music.