jgkaplan / gemini-server

Node server for the gemini protocol, based on express
ISC License
65 stars 9 forks source link

Cannot import audio files #10

Closed ghost closed 2 years ago

ghost commented 2 years ago

Tried using res.file for audio files, does not work. Could you possibly add support for this?

jgkaplan commented 2 years ago

What happens when you try to do it, and what do you expect/want to happen?

ghost commented 2 years ago

It just shows a play button, and plays nothing when I click on it (also shows no error in console). I have only tested this with .ogg files as this is what other people use on their capsules. I want to be able to play audio files stored on my server on my gemini capsule.

jgkaplan commented 2 years ago

alright I'll look into it

jgkaplan commented 2 years ago

Should be fixed now.

ghost commented 2 years ago

Issue is still occurring with audio files.

// Test
app.on('/music', (req: any, res: any) => {
    res.file(`${__dirname}/static/audio/music.mp3`);
})

This issue occurs with both mp3 and ogg files which I did test. No errors were produced in terminal.

jgkaplan commented 2 years ago

Did you update to the latest version of the library?

ghost commented 2 years ago

My bad. That was the issue.

jgkaplan commented 2 years ago

👍