lavalink-devs / Lavalink

Standalone audio sending node based on Lavaplayer.
https://lavalink.dev/
MIT License
1.58k stars 669 forks source link

Accept raw file from client #960

Closed Fyphen1223 closed 11 months ago

Fyphen1223 commented 1 year ago

Change request

Making Lavalink to accept requests which contain raw files such as mp3 or mp4. You might think that can be replaced by playing local files, but if I have to do that, I'll run into some problems (I want to play music or audio temporary, not to save file as the local file because it's too tedious if I have to handle all of the requests in the code manually)

Relevance

Might be useful for some developers like me lol

Could this be a plugin instead?

I'm not sure how can I manipulate that :(

Checklist

duncte123 commented 11 months ago

I'd just upload the file to a google cloud bucket that is configured to auto-delete the items after like a year and then make the urls publicly accessible so lavalink can play them

freyacodes commented 11 months ago

You can most likely use HTTP. If you have a local file, you can expose it through a web server. If you have the file as a Discord attachment, you can simply feed the attachment URL to Lavalink. Uploading files to Lavalink seems outside the scope of Lavalink, and could potentially be implemented as a plugin.