benkaiser / stretto Goto Github PK
View Code? Open in Web Editor NEWBeautiful web-based music player
Home Page: https://next.kaiserapps.com
License: MIT License
Beautiful web-based music player
Home Page: https://next.kaiserapps.com
License: MIT License
This is a really annoying bug but you don't preserve tracknr nor discnr so albums get all shuffled
but this also means sort should be optimized to take more in account then only the selected column.
On mobile (in my case, on a Nexus 4 and 10), not all songs are rendered.
Here's an example where only 32 songs are drawn. The rest of the page is blank.
The number 32 is calculated by this line
this.how_many_drawn = Math.ceil(window.innerHeight / this.individual_height) * 2;
and that value is then assigned to max
in the renderSong
function.
Edit: A temporary fix I'm using is this.how_many_drawn = player.songs.length;
[email protected] install /home/user/Projects/node-music-player/node_modules/express.io/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory /home/user/Projects/node-music-player/node_modules/express.io/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/obj.target/bufferutil.node SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished COPY Release/bufferutil.node CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/obj.target/validation.node SOLINK_MODULE(target) Release/obj.target/validation.node: Finished COPY Release/validation.node make: Leaving directory
/home/user/Projects/node-music-player/node_modules/express.io/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
Where is the server.js file?
It would be cool to get a nifty notification on song change.
Using html5 notifications: https://developer.mozilla.org/en/docs/Web/API/notification
Hello,
I am thinking of using the player but since it will be accessed by several friends I wouldn't like for it to be possible to change the music directory. So it would be nice if the settings button could be hidden.
Cheers
Hi, Really cool player but for a proper use i would add this following functions:
Edit tagID3, the best solution would be to use things like shazam. You send a stream he returns id3 tag but i have no idea how to do it :p
Else, just open a window to edit tag manually and save it.
Another thing: try to add music file to database even if they don't have ID3 tags. The title would be the name of the file rest would be unknown. (and editable with ID3).
That's what i added to do this: (file library_functions.js)
parser.on('done', function (err) {
if (meta == false)
{
var ext = item.split(".");
ext = ext[ext.length - 1];
if (ext == "mp3")
{
var song = {
title: item.substr(item.lastIndexOf("/") + 1, item.length),
album: "Album inconnu",
artist: "Artiste inconnu",
albumartist: "Album inconnuArtiste inconnu",
display_artist: "",
genre: "Inconnu",
year: "",
duration: "",
location: item
};
if(doc == null){
// insert the song
app.db.songs.insert(song, function (err, newDoc){
taglib_fetch(item, newDoc._id);
// update the browser the song has been added
broadcast("update", {
count: song_list.length,
completed: cnt,
details: "Added: " + newDoc["title"] + " - " + newDoc["albumartist"]
});
});
} else if (hard_rescan){
app.db.songs.update({location: item}, song, {}, function(err, numRplaced){
taglib_fetch(item, doc._id);
broadcast("update", {
count: song_list.length,
completed: cnt,
details: "Updated: " + song["title"] + " - " + song["artist"]
});
})
}
}
}
Really cool program though, if i didn't see yours i would have to code one :)
It seems all musics load on start
I followed the instructions on this site. But when doing npm install:
[email protected] install /root/node-music-player/node_modules/express.io/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)
this is on
Linux stereo 3.12.28+ #709 PREEMPT Mon Sep 8 15:28:00 BST 2014 armv6l GNU/Linux
with node version 0.12.0 and npm 2.5.1.
I'm completely new to NPM so I'm not sure if this is an issue with the code or the setup or what. So, I'm assuming that some module is not properly installed. Starting the app does open a webpage at the address, but the page is corupted some how (there are two clkicable links that do nothing called "node music player" and "music"
I would like to work on this feature, displaying the queue list on a side panel. Any advices?
I think I need to work on the player.queue_pool array. Displaying its content and sorting it on 'add_to_queue' updates.
Allow the user to edit the begin and endtime ID3. To allow to skip pauses between songs
To install a github repo with npm it's easier to do
npm i https://github.com/benkaiser/node-music-player/archive/master.tar.gz
So you don't need git installed. and it just takes 1 command :)
Also possibly date modified. Not sure if this would get too messy though, or if we should store it for now and optionally use it later.
Hi,
Would it be possible to list the IP addresses from which the clients are connected? Would like to host this app on the intranet and would like to limit number of clients to "X" users at one time.
I'm very interrested in this feature. Do you already have an idea how it will be working?
I'm doing some research and tests.
Follow up of commit
343a110#commitcomment-11603153
Crash report:
/home/benkaiser/HD/GIT/node-music-player/library_functions.js:596
if(url.indexOf("://") == -1){
^
TypeError: Cannot read property 'indexOf' of undefined
at Object.exports.sync_import (/home/benkaiser/HD/GIT/node-music-player/library_functions.js:596:9)
at syncPlaylists (/home/benkaiser/HD/GIT/node-music-player/routes/index.js:461:12)
at Socket.<anonymous> (/home/benkaiser/HD/GIT/node-music-player/node_modules/express.io/compiled/index.js:250:16)
at Socket.emit [as $emit] (events.js:107:17)
at SocketNamespace.handlePacket (/home/benkaiser/HD/GIT/node-music-player/node_modules/express.io/node_modules/socket.io/lib/namespace.js:335:22)
at Manager.onClientMessage (/home/benkaiser/HD/GIT/node-music-player/node_modules/express.io/node_modules/socket.io/lib/manager.js:518:38)
at WebSocket.Transport.onMessage (/home/benkaiser/HD/GIT/node-music-player/node_modules/express.io/node_modules/socket.io/lib/transport.js:369:20)
at Parser.<anonymous> (/home/benkaiser/HD/GIT/node-music-player/node_modules/express.io/node_modules/socket.io/lib/transports/websocket/hybi-16.js:39:10)
at Parser.emit (events.js:107:17)
at finish (/home/benkaiser/HD/GIT/node-music-player/node_modules/express.io/node_modules/socket.io/lib/transports/websocket/hybi-16.js:295:16)
When you update the details of a song, the details in the song view change, but not in the current playing song view.
Send messages back to the player (client) as syncing is happening.
I have one laptop that runs Gnome 3.14 desktop. Neither one of the two browsers installed (firefox, epiphany) can play the music from node-musicplayer, not on a local install, but also not even on the demo. The browsers do, however, play music from youtube or javascript radio apps on the webpages of radiostations. When this happens an audio appears in pulseaudio that can be amplified and directed to many various sinks. However, on Node-musicplayer nothing appears. I am not sure that this is a problem with node, or with the laptop. But given that 1) this is a fairly recent install with no or minimal tweaking and 2) other web-based audio things work might have something to do with how node offers the audio to the browser?
I want to use this as a music bot for voip through discord, so instead of serving the music to the person's computer, could it be adjusted so the music would be played through the server it is hosted on? Like the webpage with controls and such is still served to clients, but it controls the host server? I'm a total noob to node, so I don't know how much of a change or effort this would be.
So I decided to try and play around with Electron and nodejs.
I created this branch to try and experiment.
I cloned that branch and then followed the typical setup (ie, npm install
then grunt
).
However, I get a bunch of errors like the following:
Are these caused by Electron not loading the files properly, or is node-music-player loading files in a way that isn't supported?
I notice that none of the files in /static/libs
seem to be explicitly loaded. Could this be the issue?
Any plan to make responsive design?
It be cool for the downloader to automatically try to get music info instead of just parsing the youtube title.
When a song title is short, I can click the [+]
button next to it to access detailed info. E.g.
But when the title is long enough to get shortened on hover, I can no longer click the [+]
button. My cursor goes into the I
text-selection mode. To access the detailed info in these cases, I have to play the song and then hit the [+]
in the footer where it shows the currently playing song.
node app.js
root@obrt:~/test/mp# node app.js
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
/root/test/mp/node_modules/taglib/node_modules/bindings/bindings.js:79
throw e
^
Error: /root/test/mp/node_modules/taglib/build/Release/taglib.node: undefined symbol: _ZN6TagLib8IOStreamD2Ev
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at bindings (/root/test/mp/node_modules/taglib/node_modules/bindings/bindings.js:74:15)
at Object.<anonymous> (/root/test/mp/node_modules/taglib/index.js:1:99)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
Hi there,
I am unable to install the node-music-player on my system (Mac OS X Yosemite). Whenever I run npm install I get the following.
$ npm install
> [email protected] install /Users/amandogra/Work/playground/node-music-player/node_modules/taglib
> node-gyp rebuild
/bin/sh: taglib-config: command not found
gyp: Call to 'taglib-config --cflags' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/amandogra/Work/playground/node-music-player/node_modules/taglib
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the taglib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls taglib
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 14.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/amandogra/Work/playground/node-music-player
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
Please help.
Regards,
Aman Dogra
[email protected]
An option to allow transcoding via ffmpeg would greatly increase usability in remote streaming situations.
FLAC files could be transcoded to e.g. medium/lowish-bitrate ${favourite-lossy-codec} and stream on mobiles without insane bandwidth usage. Although many in the west have unlimited plans, this would be particularly useful in India and other parts of the world where connectivity is comparatively poor.
Subsonic does this on the fly as it uses stdout instead of temporary files with only minimal delay. A similar implementation would make this a fantastic Subsonic killer -- for music at least.
Thanks.
stephen@Stephen-Laptop:~/node-music-player$ node app.js
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
Express server listening on port 2000
0 tracks deleted
/home/stephen/node-music-player/node_modules/musicmetadata/lib/index.js:108
callback(exception, metadata)
^
TypeError: undefined is not a function
at done (/home/stephen/node-music-player/node_modules/musicmetadata/lib/index.js:108:5)
at /home/stephen/node-music-player/node_modules/musicmetadata/lib/id3v2.js:174:16
at emitData (/home/stephen/node-music-player/node_modules/musicmetadata/node_modules/strtok2/lib/strtok.js:351:20)
at Stream.dataListener (/home/stephen/node-music-player/node_modules/musicmetadata/node_modules/strtok2/lib/strtok.js:414:11)
at Stream.emit (events.js:107:17)
at Stream.<anonymous> (/home/stephen/node-music-player/node_modules/musicmetadata/lib/index.js:69:13)
at Stream.g (events.js:199:16)
at Stream.emit (events.js:107:17)
at drain (/home/stephen/node-music-player/node_modules/musicmetadata/node_modules/through/index.js:36:16)
at Stream.stream.queue.stream.push (/home/stephen/node-music-player/node_modules/musicmetadata/node_modules/through/index.js:45:5)
stephen@Stephen-Laptop:~/node-music-player
I'm not sure if I did something wrong during the install (Ubuntu Gnome 14.10 and Windows 8.1), but I'm getting this error when I do a regular scan on my library folder. It will add one song and then the application throws an error and stops. The song that does get added plays without issue, except that the art doesn't seem to get added.
Allow the user to drag songs onto playlists and queue etc...
There should be a prompt for this. Like seriously just wiped all the different artwork for an artist's songs because the album name was "Unknown Album".
How we can share a music to others by url?
Hi, I would like so much to try this app, but I'm getting too much problems.
I tried first with taglib 1.9.1, but I get same error than here : nikhilm/node-taglib#50
Then I tried with taglib 1.8 and it seems better but now, this error appears :
npm start
> [email protected] start /home/gg/node-music-player
> node app.js
/home/gg/node-music-player/node_modules/taglib/node_modules/bindings/bindings.js:79
throw e
^
Error: /home/gg/node-music-player/node_modules/taglib/build/Release/taglib.node: undefined symbol: _ZN6TagLib8IOStreamD2Ev
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at bindings (/home/gg/node-music-player/node_modules/taglib/node_modules/bindings/bindi ngs.js:74:15)
at Object.<anonymous> (/home/gg/node-music-player/node_modules/taglib/index.js:1:99)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the node-music-player package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-music-player
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.0-4-686-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! cwd /home/gg/node-music-player
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/gg/node-music-player/npm-debug.log
npm ERR! not ok code 0
node -v
v0.10.33
uname -a
Linux nu-server 3.2.0-4-686-pae #1 SMP Debian 3.2.60-1+deb7u3 i686 GNU/Linux
Any ideas?
Can this project give me facility to play audio tracks on a port and listeners from all over the world can listen same music from there. And also the server must be play 24/7.
Hi there, I'm getting this warning when I'm trying to play a song.
Media resource http://localhost:2000/songs/MUDxcHqIs29LhIdK could not be decoded.
All candidate resources failed to load. Media load paused.
What I'm doing wrong?
bugs found:
I may have missed some things
Hi,
First, thanks for this great project, I just downloaded it and it works great on my system :)
It would be nice to allow deleting file, i forked the project but I can't see where I can do that, any advise ?
It need to access the filesystem and delete it by file path, eg:
fs.unlink("C:/music/file.mp3");
The dynamic scrolling has a bug where when you get close to the bottom of a songview (seen best with 2 * numberDrawn
songs) it freezes on the same view while it adds in more to the bottom (making the window taller than it should be.
I have node 10.26 installed.
getting this log:
dhcp-10-14-116-179:node-music-player bbonner$ npm install
npm http GET https://registry.npmjs.org/taglib
npm http 304 https://registry.npmjs.org/taglib
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0
[email protected] install /Users/bbonner/temp/node-music-player/node_modules/taglib
node-gyp rebuild
gyp http GET http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz
/bin/sh: taglib-config: command not found
gyp: Call to 'taglib-config --cflags' returned exit status 127.
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Darwin 12.5.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/bbonner/temp/node-music-player/node_modules/taglib
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the taglib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls taglib
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 12.5.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/bbonner/temp/node-music-player
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/bbonner/temp/node-music-player/npm-debug.log
npm ERR! not ok code 0
I included it on the post in G+, but realized this is probably a better spot.
It's me again !
The view of the app is not suited yet for android, the screen is too small and the left panel tae almost all the place + impossible to read a music
Steps to reproduce:
What is expected:
What happens:
neat project!
one thing:
click on "fetch new music" -> youtube
enter playlist url. It gets the first song and then dies:
Express server listening on port 2000
https://www.youtube.com/watch?v=4wgrzp1DCs4&list=PLdvAo5zrwY6iqn2DWdRobnbsW_FV9MMwp
Started converting Youtube movie to mp3
finished!
node-music-player/library_functions.js:654
finalCallback();
TypeError: finalCallback is not a function
at node-music-player/library_functions.js:654:15
at callback (node-music-player/node_modules/nedb/lib/executor.js:30:17)
at node-music-player/node_modules/nedb/lib/datastore.js:299:12
at node-music-player/node_modules/nedb/lib/persistence.js:197:12
at FSReqWrap.oncomplete (fs.js:82:15)
any ideas?
Hi just installing the project and got a warning from NPM regarding the deprecated MD5 module with instructions that [email protected] should be used. Not sure if this a major issue but figured it was worth an issue report. :)
Allows for better management of multiple playlists
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.