adding vehicles
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data.action === "playSound") {
|
||||
let id = event.data.sound;
|
||||
let audio = document.getElementById(id);
|
||||
if (audio) {
|
||||
audio.currentTime = 0;
|
||||
audio.volume = event.data.volume || 0.6;
|
||||
audio.play();
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user