Export audio to html using <audio> tag not <a>

When exporting note with audio attachments to html file, the audio will be tagged with a tag, not audio tag.

1 Like

Hi there, welcome to the forum

Thanks for the suggestion, it took me a while to figure out what is this feature about. So, let me rephrase it real quick:

Allow including audio (and video) player provided by built-in markdown plugin into HTML File exported page.

Am I getting it right?

For the linking sake: related old issue

1 Like

Reverse engineered further your intentions of opening the issue on github

I think you have tried to force the player export using the audio html tag

<audio controls src=":/ID"> </audio>

But, to no avail, as Joplin doesn't support playing local audio files with the player provided by the tag, even though Joplin does export the player.

So, this would be your next feature suggestion, am I right?

Support playing audio using audio tag <audio controls src=":/ID"> </audio>

As this looks like a feature suggestion, how about we first discuss it here before considering it as a bug on github?

Laurent's position on this: such functionality is more advanced hence not officially supported.

2 Likes

Yes. This is exactly what I request.

1:

2

1 and 2 are both my feature suggestions. And they both work for my case. But, 2 is more general.

I mean I get the general premise that Joplin is named after a musician yet cannot export the audio player to listen music at the moment. However, as the feature was mentioned like 5 times total since creation of Joplin other users do not use this functionality very often. Would you care to tell what's it good for?

If you have a good use case for it, let's hear it.

My use case for exporting audio in html is to share my note with audio with others. In the current version of Joplin, what exported to the html is a <a> tag, not a <audio> tag, which is not convinient for others to listen (no controls on the page). To listen to the audio on the html, they need to download the audio first. It's just a little bit inconvinient in this case, nothing else.

Except for that, the Joplin is a very cool app for me, and it satisfies most of my use cases. Thank you for all your great work!

A bit more testing:

Unfortunately, due to lack of audio tag support, this behaviour made its way to Joplin Cloud.

If a note is published, even though the file should be able to play using <audio controls src=":/ID"> </audio> (the resource is essentially remote/hosted on Joplin Cloud), it does not.

As a piece of speculation, I imagine it's happening because Joplin Cloud does not expose direct links to files.

So, to summarize, at the moment there's no functionality to play video/audio on published notes, only to download it. To make it work user must upload a media to another web hosting and paste into the audio tag.

Here's the demo page used for testing:

https://wyyud1eec6.joplinusercontent.com/shares/GkPfQx1k43Ji5purEPnWVIDQvABg3f1O


I wonder if there's any demand for Joplin Cloud APIs that could, among other operations with storage, be used to generate direct file links, essentially enabling file web hosting. Aside from that, such APIs could be used to process attachments/notes in the cloud, paving a way to advanced operations: to name a few "Cloud based backup" and "Corrupt database analysis & recovery".

1 Like