<a-assets>
<audio id="river" src="river.mp3" preload="auto">
</audio>
</a-assets>
<a-entity sound="src: #river"></a-entity>
var entity = document.querySelector('[sound]');
entity.components.sound.stopSound();
最佳答案
document.querySelector('audio').stop();
有效还是entity.pause()
有效?
关于javascript - 声音不会在A-Frame中的单击事件上停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44717914/