I am trying to add a background music to my story with this inserted into the top of the start of the twine story.
<audio autoplay loop>
<source src="music/hearthstone.mp3" type="audio/aac>
</audio>
The music file is a subfolder for which the HTML doc is stored, the specifications are all correct, i have tried to get it to work with the torch browser and firefox. Am i missing something?
Comments
Also, you missed a closing quote in the type statement.
<audio autoplay loop>
<source src="music/hearthstone.mp3" type='audio/mpeg; codecs="mp3"'>
</audio>
You seem to be standing on the edge of an upside down cliff, looking directly infront of you is a lush mountain peak. It has much more foliage than a rocky tip has the right to.
Below you is nothing, your feet are stuck in place in mid air, above the rocky shape of what should be down the mountain you see the edges slowly close to a point, so it appears as if the mountain is floating.
You feel a tight grip against your right wrist and see a stone skeleton, frozen in the hard rock, loosly keeping you connected to the floating mountain.
DriftAway
RedPowerGain
Safe1
I do have the StoryInt passage with this:
<<cacheaudio "mainsong" "music/hearthstone.mp3">>
Also, make sure it's StoryInit, not StoryInt.
It just comes up with Error: <<audio>>: no track by ID: mainsong
The StoryInit is coded with
<<cacheaudio "mainsong" "music/hearthstone">>
I cannot say if this is your only issue at this time, however, in that last example you're not specifying a file extension. The file extension is the only way SugarCube v1 has to determine the audio file type. SugarCube v2 has additional options for that, however, the file extension is still the default method to determine the audio file type.
You really need to copy and paste directly from your code. Every time you post your code its different. Anyway, one more good college try:
To humor me, double check one more time that the file path is right and free of any silly errors, like a folder named "musci" or something. Then copy and paste the above exactly as it's written into the StoryInit and Start passages, and let me know if you have any luck.
Thank you for this, it finally works