diff options
Diffstat (limited to 'webAO/components/blip.js')
| -rw-r--r-- | webAO/components/blip.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/webAO/components/blip.js b/webAO/components/blip.js new file mode 100644 index 0000000..409b907 --- /dev/null +++ b/webAO/components/blip.js @@ -0,0 +1,17 @@ +import AO_HOST from '../client/aoHost' + +/** + * + * @param {number} amountOfBlips Amount of Blips to put on page + */ +const createBlip = (amountOfBlips) => { + for (let i = 0; i < amountOfBlips; i++) { + const audio = document.createElement('audio') + const blipUrl = `${AO_HOST}sounds/general/sfx-blipmale.opus` + audio.setAttribute('class', 'blipSound') + audio.setAttribute('src', blipUrl) + document.body.appendChild(audio) + } +} +createBlip(3) +export default createBlip
\ No newline at end of file |
