Is there a way to loop the music back to a certain point in the song? Kind of like how you can do it for animations? I want to be able to play the beginning of a song only once, and have the song loop back to part 2 after it finishes instead of repeating
Develop games in your browser. Powerful, performant & highly capable.
Yes you can. The Audio object has a "seekto" function that plays a sound starting from a time given, going back/forward from where you were in that sound.
So get the exact timestamp of the start of part 2, and add a seekTo at the end of the song :)
thanks! :) also one more question...
We import .WAV files, but once they are converted, do we need to keep them? they raise the download size a lot