Ask coding questions

← Back to all posts
How to add background music that constantly loops. And how to add background music in general.
JohnBarnhart (17)

How to add background music that constantly loops. And how to add background music in general.

Answered by InvisibleOne (2681) [earned 5 cycles]
View Answer
Comments
hotnewtop
InvisibleOne (2681)
var audio = new Audio("src.mp3");
audio.loop = true
audio.play()