aboutsummaryrefslogtreecommitdiff
path: root/webAO/components/blip.js
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-03-23 22:26:33 +0100
committerstonedDiscord <Tukz@gmx.de>2022-03-23 22:26:33 +0100
commit06ee582c4adefdb35220c63ee4a30444474e9388 (patch)
treedb90fc0814013d7c43029f1094cf6f8afffe67e5 /webAO/components/blip.js
parentcd3f7eda8f8a9c407b7750a374e8a40c52c2d881 (diff)
parent30b4e3e8c84ce3f980fe895d4c64800fc7f00ece (diff)
Merge branch 'master' into coolloading
Diffstat (limited to 'webAO/components/blip.js')
-rw-r--r--webAO/components/blip.js17
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..eacbeaf
--- /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(6)
+export default createBlip \ No newline at end of file