vincelwt / harmony

:musical_note: Sleek music player for Spotify, SoundCloud, Google Play Music and your local files
http://getharmony.xyz
859 stars 58 forks source link

Windows/Linux media key support #14

Closed NickFlamel closed 7 years ago

NickFlamel commented 8 years ago

Harmony doesn't have support for physical media keys, or support for keyboard shortcuts.

vincelwt commented 8 years ago

Harmony should supports media keys (on Mac) and provide a bunch of keyboard shortcuts:

Space -> Play/Pause N or Ctrl/Cmd + Right -> Next track P or Ctrl/Cmd + Left -> Prev track L -> Like track Ctrl/Cmd + F -> Search

Are you using a Mac ?

NickFlamel commented 8 years ago

No, I'm using Windows. Here's the keyboard I'm using: http://www.coolermaster.com/peripheral/keyboards/octane/ I guess I meant universal media shortcuts, so I can change songs when I'm not in Harmony.

vincelwt commented 8 years ago

Well, this is based on this plugin so it should works. I will make some tests when I can access a Windows computer

lferf commented 8 years ago

Keyboard shortcuts works well on Windows. However, my physical media keys doesn't work.

icd13 commented 7 years ago

This fixed now?

vincelwt commented 7 years ago

@icd13 Nop, there is a problem with the mediakeys plugin build on windows.

Output from AppVeyor:

> mediakeys@0.1.1 install C:\projects\harmony\node_modules\mediakeys
> node-gyp rebuild
C:\projects\harmony\node_modules\mediakeys>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild ) 
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  MMShellHook.cpp
  win_delay_load_hook.cc
     Creating library C:\projects\harmony\node_modules\mediakeys\build\Release\MMShellHook.lib and object C:\projects\harmony\node_modules\mediakeys\build\Release\MMShellHook.exp
win_delay_load_hook.obj : error LNK2001: unresolved external symbol __stricmp [C:\projects\harmony\node_modules\mediakeys\build\win\MMShellHook.vcxproj]
C:\projects\harmony\node_modules\mediakeys\build\Release\MMShellHook.dll : fatal error LNK1120: 1 unresolved externals [C:\projects\harmony\node_modules\mediakeys\build\win\MMShellHook.vcxproj]
  win.cpp
  win_delay_load_hook.cc
win.obj : warning LNK4258: directive '/ENTRY:mainCRTStartup' not compatible with switch '/ENTRY:WinMainCRTStartup'; ignored [C:\projects\harmony\node_modules\mediakeys\build\win\keylistener.vcxproj]
  Generating code
  Finished generating code
  keylistener.vcxproj -> C:\projects\harmony\node_modules\mediakeys\build\Release\\keylistener.exe
  keylistener.vcxproj -> C:\projects\harmony\node_modules\mediakeys\build\Release\keylistener.pdb (Full PDB)
gyp
 ERR! build error 
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp
 ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! 
stack
     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp

ERR!
 System Windows_NT 6.3.9600
gyp

ERR!

command
 "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp

ERR!

cwd
 C:\projects\harmony\node_modules\mediakeys
gyp

ERR!

node -v
 v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
eliassotodo commented 7 years ago

Keyboard shortcuts are working well in Ubuntu 16.04. but the media keys (FN + F10, FN + 11, FN + F12) don't work. It seems to be a problem with mediakeys:

[8286:1007/231805:INFO:CONSOLE(18)] "Mediakeys module not found.", source: file:///home/brahiansoto_me/Projects/harmony/app/js/player.js (18)

When I try to npm install mediakeys an error error occurs:

npm ERR! mediakeys@0.1.1 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the mediakeys@0.1.1 install script 'node-gyp rebuild'. 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 mediakeys package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild

I am running: node v6.7.0, npm 3.10.3

vincelwt commented 7 years ago

Should now work on Windows!

icd13 commented 7 years ago

The version 0.4.2 is not working in my windows 10. Sorry, I can not help you.