I'm using Twine for a project and I've hit a roadblock with adding audio. I made a StoryInit file and put this in it:
<<cacheaudio "bgmsoundcolor" "media/audio/twineintrosoundcolor.mp3">> and then I put <<audio "bgmsoundcolor" play>> in the passage I wanted the clip to play in. I've tested it in my browser and despite no errors popping up, nothing is playing. I'm not sure what exactly I'm doing wrong, and any help would be greatly appreciated!
(I did the whole "make the directory file and put the audio file in there" thing and I'm using Sugarcube 1.0.32)
Comments
a. The folder where you store your story HTML file generated using the Publish to File option.
b. The folder in point A should contain a sub-folder named media
c. The media folder should contain a sub-folder named audio
d. The audio folder should contain a file named twineintrosoundcolor.mp3
I currently have the folder on my desktop, should I move it to the Twine folder? I don't know if it'd make a difference or anything (I read in a different thread that desktop was fine).
Also, do I need a different file besides the mp3? I've seen something about an .ogg too, but I'm not sure if it's required to get the audio to work.
Which web-browser are you using to test your audio file?
Not all web-browser brands support the same audio media formats which is why it can be a good idea to include the same audio file in different formats, this link leads to a page where you can test your web-browser against the different formats in common use.
The Mozilla Developer website has a Browser compatibility list