0 votes
by (2k points)
I'm usic the code provided by wiki <audio src="https://solomontwine.yolasite.com/resources/Dark%20Choir%20Music%20%20%28Download%20And%20Royalty%20FREE%29.mp3" autoplay> but the song restarts when I transition to the next passage. How can I get it to keep playing? Also, how do I get it to loop? I found this explanation video that answers my questions, but it doesn't let me chose in which passages I want the music nor lets me add more than 1 song: https://www.youtube.com/watch?v=bm9Lvd1Qg4Y&t=633s Thank you in advance. Using most recent twine harlowe.

2 Answers

+1 vote
by (159k points)
selected by
Best answer

Unfortunately any HTML audio element you added to the current passage (and it's header or footer) is destroyed when the next Passage Transition occurs, this is why your song keeps stopping.

I suggest you change to ChapelR's Harlowe Audio Library instead, which is JavaScript based and includes the ability for audio files to keep playing during a Passage Transition.

+1 vote
by (44.7k points)

You didn't include your story format in the question tags, but assuming you're using the SugarCube story format in Twine, then my answer in this post from a few days ago should help you out.

Have fun!  :-)

by (2k points)
Hey, thank you, you are very kind and sorry, but no, I'm using latest harlowe (I'm a super noob). Do you have any other solutions?