play intro song after scene load to prevent choppy

This commit is contained in:
Kevin Ngo
2018-09-25 03:57:02 -07:00
parent 447136b76c
commit b41c5e127c
2 changed files with 13 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
AFRAME.registerComponent('intro-song', {
multiple: true,
play: function () {
const audio = document.getElementById('introSong');
audio.volume = 0.5;
audio.play();
}
});