freshleafmedia / jukebox Goto Github PK
View Code? Open in Web Editor NEWSimple music player used in office
Simple music player used in office
Just need a click handler for the shutdown button that issues a shutdown -h now
command
Maybe show static?
Create a statistics JSON object that keeps track of basic statistics:
The pause and play buttons visual state should change when respective actions are made
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
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
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 emptyThe sound bites tend to be really quiet. Just prior to them playing we could call CVLC to set the volume
Add a Dockerfile to make development easier
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 there is no visual way to tell that a song has failed to download
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.
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
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:
◾
)▮▮
)▶
)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.
Currently the service has to be installed manually this can easily be added to the install script
As this is an open-source project, we should be able to use TravisCI to run Continuous Integration tests
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
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?
If a songs state is STATE_DOWNLOADING
when its persisted to the playlist JSON file it will be loaded back in the same state
This will prevent 2 people pressing pause and keep music playing
This will allow skipping long intros and outros to songs
I believe YouTube Videos have categories, we could search only in the music category.
Not sure how well the categories are organised/used?
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
We dont need to install all of VLC the package vlc-nox
contains everything we need
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
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
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
A button that randomises the current queue while keeping the song that's currently playing at the top
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.
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
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
When the last song in the playlist finishes the HTML title is not returned to normal
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
When a song is paused the disk-thumbnail image keeps spinning, just needs a animation-play-state: paused
CSS rule
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?
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 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
Node v5 is installed, there is no reason we can't use 6
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
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.