Comments (13)
There is currently no way to play directly from the disk, however you can set up an http server to serve those files and use a network FileTrack (see docs/FileTrack.md)
from yasha.
If this is something you need then I can work on this issue
from yasha.
Was thinking about doing the same thing after making this issue. I believe that should work, but I'd love to see it natively supported in the future.
I deeply appreciate your efforts on this perfect project, thanks a lot!
from yasha.
May I know why you are using this as opposed to lavaplayer (lavalink)?
from yasha.
Lavalink has this problem where the track would start playing briefly before the bot becomes fully connected since it doesn't emit a ready event. Sometimes it just stops sending the audio out of nowhere. I've tried other packages like djs/opus and they all cause memory leaks and fragmentation, and have inferior audio quality.
from yasha.
See docs/FileTrack.md on how to use it
For security purposes, you may want to prevent users from attempting to play local files on your system if you allow them to play from any arbitrary url
if(track.isLocalFile) return;
from yasha.
I forgot to mention that local file support is added, let me know if you have any issues
from yasha.
I've been able to run it perfectly on local Ubuntu 20 but on Ubuntu 18 I'm getting this error for some reason.. [Error: Invalid data found when processing input]
It's obviously related to ffmpeg because I couldn't install these packages (libavcodec58 libavformat58 libavutil56 libavfilter7 libswresample3) for sange since they're not available on bionic. I've also built ffmpeg from source but it still didn't help.
I can't update my vps to ubuntu 20 at the moment. Should I just dockerize everything or is there something I can do to get it working on bionic?
from yasha.
I don't have experience with docker. Could you paste the error message from building ffmpeg from source?
from yasha.
Also if your bot serves many people, its recommended to install ffmpeg from source to avoid the infinite loop problem
The packages are probably just outdated on Ubuntu 18 so if you type out most of the name (e.g sudo apt install libavfilter) and then spam tab key it will show up with the version that's available
from yasha.
Another thing is it may be required to update the npm packages via npm update
from yasha.
Could you paste the error message from building ffmpeg from source?
I didn't get any errors from that, the error was emitted from the TrackPlayer instance after calling start().
Anyways, the problem was that I installed ffmpeg libraries then built if from source on top.
Everything is working perfectly, as well as playing local files. Thank you a lot.
from yasha.
No problem 👍
from yasha.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yasha.