Embedding audio in logseq

awesome! thanks. This is exactly what I needed.

2 Likes

If I have something like assets/recording.mp3 in my local logseq folder, how could I embed it using this syntax?

2 Likes

I would think it would be like

[:audio {:controls true :src "../assets/recording.mp3"}]

(but I’m trying that now and it’s not working for me. Did you get it working?)

1 Like

@aadil / @techieshark

You need to put an absolute path like /Users/tobitobsen/Documents/logseq/assets/greatest-song-ever.mp3.

Is it possible to get audio timestamp like the built-in youtube timestamp?

1 Like

Allow for embed of audio files, similar to Roam.
image

1 Like

Requiring the full path is unfortunately making impossible a cross devices usages. Ie the path won’t be a same from my work/home/mobile devices.

1 Like

I faced the same thing, so I built a plugin for this.

Have submitted it to the marketplace, and will let you know once it’s up. Basically all you need to do is to specify the filename, and ensure the file is in the assets folder.output

6 Likes

@hkgnp thanks so much for developing that logseq plugin - is your plugin available on github for manual installation?

There you go. It’s not yet available on Marketplace.

2 Likes

It actually is in the marketplace! Haha. Search for Logseq-localassets-plugin.

1 Like

Oh okay I see it now. Can’t search for it (probably a bug) but can see it in the marketplace.

1 Like

Ben, this is a great plugin for those who want to create rich flashcards. However, having to manually type the file name is a bit cumbersome if you have loads of cards to add. Could you please consider drag-drop support?

I’m curious if there’s a way to do something similar on mobile trough the configuration file. :thinking:

Hi guys, this feature will be supported natively in the next release. see more info in Feat: record audio on mobile by llcc · Pull Request #4766 · logseq/logseq · GitHub.

2 Likes

It’s in the fresh nightly release! So cool!

I was not able to make it work even after updating to version 0.7.1, non o this worked:

[:audio {:controls true :src "../assets/audio.mp3"}]
[:audio {:controls true :src "./assets/audio.mp3"}]
[:audio {:controls true :src "assets/audio.mp3"}]
[:audio {:controls true :src "audio.mp3"}]

Trying using ![…/assets/audio.mp3]

It might be ![./assets/audio/mp3] as well

Looks like it has to be:

![](../assets/audio.mp3)

I tried and see the audio block, but for some reason. I can’t play the audio and it is shown as 0:00/0:00.
Not sure why
image

I can clearly see the assets in the folder.
image

Please help me :cry:

1 Like