siddharth11 / itunes-remote Goto Github PK
View Code? Open in Web Editor NEWRemotely control iTunes on Mac without Internet πΆπ±
License: ISC License
Remotely control iTunes on Mac without Internet πΆπ±
License: ISC License
Would it be possible to add an AirPlay device list? I already looked into the AppleScript side and came up with the following:
module.exports = {
getAirPlayProperties: `tell application "iTunes" to get properties of every AirPlay device`,
getAirPlayDevices: `tell application "iTunes" to get name of every AirPlay device`,
getSelectedAirPlayDevices: `tell application "iTunes" to get name of every AirPlay device whose selected is true`,
getAirPlayDeviceVolume: `tell application "iTunes" to get sound volume of AirPlay device "${$val}"`,
setAirPlayDeviceVolume(arr) {
return `tell application "iTunes" to set sound volume of AirPlay device "${arr[0]}" to ${arr[1]}`
}
}
I'm not sure how to add it to the UI (but I did check and there is a Material Design icon for AirPlay), but could suggest putting it at the top center between the other two, sliding a panel down from the top (or could treat it like the Music app in iOS and put it at the bottom, sliding up from there).
I'm picturing a list of available AirPlay devices, with a checkbox or similar next to those that are already selected, with a volume slider for each device, largely similar to how iTunes already handles this:
I'm not very familiar with the front end work but can totally give a hand on the back end. From what I've read there's a little bit more that AppleScript can handle in regards to AirPlay as well, so I'll research that further to see if it would make sense to add. The above can be phrased differently too depending on what needs returned.
Hey, it's me again, sorry! Just wondering if you've run into this. I've been leaving this running, music playing or not, but at some point (haven't narrowed down how long it takes) it errors out. The status seems to fall into an undefined state for some reason, but nothing changed on the machine, it's a Mac Mini sitting idle otherwise. I'm trying to familiarize myself with the various modules, but hoping you might have some insight.
Here is the output:
/Users/aaron/iTunes-Remote/node_modules/node-osascript/lib/index.js:14
stream.on('data', function( chunk ){
^
TypeError: Cannot read property 'on' of undefined
at bufferStream (/Users/aaron/iTunes-Remote/node_modules/node-osascript/lib/index.js:14:9)
at execute (/Users/aaron/iTunes-Remote/node_modules/node-osascript/lib/index.js:31:19)
at Object.execute (/Users/aaron/iTunes-Remote/node_modules/node-osascript/lib/index.js:69:5)
at osa.execute (/Users/aaron/iTunes-Remote/server/serverSideEvents.js:85:25)
at ChildProcess. (/Users/aaron/iTunes-Remote/node_modules/node-osascript/lib/index.js:49:7)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
Make it easy for end user. No need for npm install and running server from terminal again and again. Wrap it inside Electron, which can run the server in background.
The electron main file will just execute the server.js file. We can have a simple start/stop toggle button on the app UI which will just control the server execution, and if the server is on it will also display the IP Address to access the remote.
I have a Mac Mini that I hadn't gotten around to updating to macOS Sierra from El Capitan when I discovered this project, so I installed it and it ran (mostly, the playlist controls were blank). Later I decided it was a good time to upgrade to Sierra, let it do its thing, but when I came back to the Mac and restarted this project, it errored out with the following:
[email protected] start /Users/aaron/iTunes-Remote
node server/server
/Users/aaron/iTunes-Remote/server
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::5000
at Object.exports._errnoException (util.js:1036:11)
at exports._exceptionWithHostPort (util.js:1059:20)
at Server._listen2 (net.js:1252:14)
at listen (net.js:1288:10)
at Server.listen (net.js:1384:5)
at Object. (/Users/aaron/iTunes-Remote/server/server.js:18:6)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.6.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: node server/server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node server/server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the itunes_remote package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server/server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs itunes_remote
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls itunes_remote
npm ERR! There is likely additional logging output above.
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.