freshleafmedia / jukebox Goto Github PK
View Code? Open in Web Editor NEWSimple music player used in office
Simple music player used in office
Currently when an uncached song is added it immediately starts downloading. This can causes crashes if a large number of songs are added at once, instead they should be downloaded in a queue, maybe even just one at a time.
As this is an open-source project, we should be able to use TravisCI to run Continuous Integration tests
When YT channels are returned in results it causes the search to not display results.
Believe this is to do with trying the get song durations?
It would be relatively easy to add an icon to the start of the page title making it easy to see at a glance the state of the jukebox.
Maybe something like:
◾
)▮▮
)▶
)If you stop the jukebox service VLC will continue to play, perhaps keep the PID of the VLC on disk and add a clauses to the service stop state to kill that PID
Keep track of the date a song was last played (in the <YTSONGID>.info.json
file) and every now and again scan the cache for songs that haven't been played in a week and removed them from the cache
The sound bites tend to be really quiet. Just prior to them playing we could call CVLC to set the volume
Currently the sound bites are stored as a module that's required, which means the project has to be transpilled every time you add a soundbite if they were stored as JSON that wouldn't be necessary
Just need a click handler for the shutdown button that issues a shutdown -h now
command
If the stats.json
file isn't present or doesn't contain a valid object an exception is thrown. This means the Jukebox doesn't run out of the box.
Need to:
stats.json
file if it doesn't exist on bootstats.json
with {"songs":{}}
if it's emptyWhen a song is paused the disk-thumbnail image keeps spinning, just needs a animation-play-state: paused
CSS rule
A button that randomises the current queue while keeping the song that's currently playing at the top
When searching for a song to play it would be nice if songs that are currently in the queue are marked as such in your results
Create a statistics JSON object that keeps track of basic statistics:
It would be good to have a set of at least 4 hours of mellow songs that would play in the background on a loop when the queue was empty.
It could then be interrupted at any point with a request.
The YT downloader tools needs frequent updates to keep it working this could be added to the initialisation of the Jukebox and can even be done asynchronously
To update call, as root: youtube-dl -U
Would be good if there was an ability to preview a song before adding it to the playlist. As a simplistic first step we could have an icon link that opens it in a new tab on YouTube and you can then listen to it on your machine.
It would make things a little easier to find if all the client related code was in it's own directory rather than mixed in with all the install, test, config etc.
It also means the server and client can have their own package.json
The pause and play buttons visual state should change when respective actions are made
If a songs ID starts with a -
eg -Aj9_8t1eQc
when its passed to youtube-dl
it thinks its a group of arguments:
./download.sh -Aj9_8t1eQc cache logs
I believe YouTube Videos have categories, we could search only in the music category.
Not sure how well the categories are organised/used?
Currently the service has to be installed manually this can easily be added to the install script
Currently there is a static list of things to install when creating the Docker container, instead we could just copy the installer script into the container and run that.
Saves repeating code to
Add some kind of titles or labels to the soundboard tabs. This could be as simple as adding a title
attribute to the tab elements
Currently when a soundbite plays it starts listening for control connections on the same port, it should be different so it can be controlled separately
It would be good to wait for the user to stop typing for a short period before firing the API search event as they get queued up and when typing you fire a fair few requests.
There must be an API limit but i guess we are no where near it?
Would be nice if we had a desktop notification when we were down to the last song in the queue. This way ewe can add one and get it processed before the current queue ends
Currently the back media button is not used, will be good when we have playlists setup but on the dynamic 'request' playlist we can use it to return to the start of the current song which might be nice
Upon selecting a playlist the all songs in that list should be added to the current queue and the name of the person who added the list should be attached to the songs
We dont need to install all of VLC the package vlc-nox
contains everything we need
Add a Dockerfile to make development easier
Every now and again the whole thing just crashes it seems to be just as a song ends:
SONG[xN99hTB6rLU] STATE: playing_finished
SONG[xN99hTB6rLU] STATE: removing
PLAYLIST[0] STATE: ready
fs.js:980
return binding.unlink(pathModule._makeLong(path));
^
Error: ENOENT: no such file or directory, unlink 'playlists/0.json'
at Error (native)
at Object.fs.unlinkSync (fs.js:980:18)
at Playlist.<anonymous> (/var/www/html/server/playlist.js:93:8)
at FSReqWrap.oncomplete (fs.js:82:15)
This leaves the 0.json
play list completely empty
This will allow skipping long intros and outros to songs
Node v5 is installed, there is no reason we can't use 6
It would be nice to have the song selection modal have a tab for search as we do now but then also a tab with a list of the last or most played 25 songs
If a songs state is STATE_DOWNLOADING
when its persisted to the playlist JSON file it will be loaded back in the same state
Maybe show static?
Currently there is no visual way to tell that a song has failed to download
When the last song in the playlist finishes the HTML title is not returned to normal
This will prevent 2 people pressing pause and keep music playing
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.