Walkyst / lavaplayer-fork

Apache License 2.0
173 stars 68 forks source link

[Feature Request] Allow Java based resources as local tracks #115

Closed TheComputerizer closed 7 months ago

TheComputerizer commented 1 year ago

I have been wondering for a while if it is possible to use resources loaded by java as tracks loaded by lavaplayer. The idea would be to get a URL from CLass#getResource, get the URI from that, and then be able to use it with an AudioReference. Or maybe some way to pass through Class#getResourceAsStream would be good.

This would be nice since I am using lavaplayer in a mod for a game which does resource loading through Java so I cannot really use the audio from the game without downloading it to use as local files or making a custom implementation of SeekableInputStream that can be made from an InputStream of the resource

If this is already possible please let me know because this would be a very big QoL improvement for my system.