+ 3
Can you make the music on here for me because I dont know how.
3 odpowiedzi
+ 2
Add this to your JS tab and it should work. It worked when I tested.
document.addEventListener('DOMContentLoaded', function() {
var continueButton = document.querySelector('.swal-button--confirm');
var audio = new Audio();
audio.loop = true; // repeat the music after it finishes.
audio.src = 'https://www.dropbox.com/s/mza0ghu4z3czbbn/Software%20Developer%20Short%20Film%20-%20Bgm.mp3?dl=1';
function playMusic() {
audio.play();
}
continueButton.addEventListener('click', playMusic);
});
+ 3
Josh Greig I want it to play when you press it
0
I'm not sure what you mean by "make the music on here".
You just want some audio playing in the background?
Do you want the music to repeat after it finishes playing?