JunyTony Sounds
About this app
A fun and colorful web app for playing sounds
JunyTony Sounds
Related apps
Put this on your site
Source
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>JunyTony Sounds</title>
<meta name="description" content="A fun and colorful web app for playing sounds">
<meta name="keywords" content="JunyTony, sounds, music, fun, colorful">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
document.addEventListener("DOMContentLoaded", function() {
// Sound objects
const sounds = [
{
name: "Clap",
sound: "https://freesound.org/data/previews/124/124278_233729-lq.mp3",
icon: "fa fa-hand-rock-o"
},
{
name: "Kick",
sound: "https://freesound.org/data/previews/88/88912_480635-lq.mp3",
icon: "fa fa-microphone"
},
{
name: "Snare",
sound: "https://freesound.org/data/previews/256/256759_1618244-lq.mp3",
icon: "fa fa-music"
},
{
name: "Hi-Hat",
sound: "https://freesound.org/data/previews/250/250183_1676145-lq.mp3",
icon: "fa fa-headphones"
}
];
// Create sound buttons
const soundContainer = document.getElementById("sound-container");
sounds.forEach(function(sound) {
const button = document.createElement("button");
button.classList.add("btn", "btn-primary", "btn-lg", "m-2");
button.innerHTML = `<i class="${sound.icon}"></i> ${sound.name}`;
button.addEventListener("click", function() {
const audio = new Audio(sound.sound);
audio.play();
});
soundContainer.appendChild(button);
});
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
/* App CSS Goes Here */
body {
background-color: #F8F8F8;
font-family: 'Arial', sans-serif;
}
#main-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.btn-primary {
background-color: #FF4081;
border-color: #FF4081;
}
.btn-primary:hover {
background-color: #F50057;
border-color: #F50057;
}
.btn-primary:focus {
box-shadow: 0 0 0 0.2rem rgba(255, 64, 129, 0.5);
}
</style>
</head>
<body>
<div id="main-container" class="container">
<div id="sound-container"></div>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!