0 votes
by (2.5k points)
closed by
It's been a year.

 

Yes, I know Twine 2 "can't" embed music yet, but come on...

 

A YEAR?

 

Isn't there any way y'all have found a way around it?

Or if not, when the hell is this gonna be added, because it seems as if no progress is being made towards it.
closed with the note: Got my answer.

1 Answer

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

What exactly do you mean by "embed music" or "embed media"?

1. If you mean the ability to play audio/video files or view image files within a Harlowe based story HTML file.

You can already do this using by using either a standard HTML audio element / video element; a JavaScript Audio object or by using a third party JavaScript like Howler for Harlowe (or it's currently in beta replacement Harlowe Audio Lib).

2. If you mean why doesn't Harlowe include built-in macros / functionallity to play / view different types of media files. (similar to the features found in the SugarCube story formats)

It is the responsible of each story format's developer to decide what core functionallity they want to implement / include in their story format, so if you have any suggestions on how Harlowe could be improved then I suggest creating a new issue on that project's BitBucket repository.

This way you can communicate directly with Harlowe's developer and let them know about your concerns, because the developer may not see this post on the Q/A site.

3. If you mean why is it difficult to use a Relative URL to reference externally stored media file while using the Test / Play modes in the Desktop release of the application.

It is because the HTML document generated by those modes only exists in the memeory being used by the Desktop application's built-in custom web-browser. Unlike the Publish to File option those modes don't create a physical HTML file on your local hard-drive, which means there is no HTML file for the referenced media to be stored Relative to.

This is why you either need to use the Publish to File option to generate a story HTML file and to save that HTML file in the location reletive the media file; or you need to temporarily change the relevant URL to a Fully Referenced URL; to reference a locally stored media file.

4. If you mean storing the contents of a media file directly within the story project itself, and then having that contents embedded internally within the generated story HTML file.

While HTML itsefl (and the web-browser developers) supports doing this for some media types doing so can eventually result in loading issues as the HTML file becomes larger. Web-browsers include specially designed caching systems to handle the accessing and temporary memory storage of extenal media files, these caching systems generally don't include the ability to do the same for media content directly embedded within the HTML file.

This is why it is generally recommends not to store/embed the contents of media files directly within the HTML file itself, and if you do so then to limit it to only a small amount (in MBs) of such content.

5. Something else entirety?

by (2.5k points)
What I mean would be 2, 3 and even 4, I've been trying and trying but it doesn't seem to wanna work, but I'll keep trying.
by (2.5k points)
Ok, I've hosted my game on NeoCities, (https://glitchy-games.neocities.org)

I am starting to understand how media works much better, it's not as hard as I thought it was.

I didn't know I needed to have an embeded link for it to work.

It's all starting to come together now.
...