Comments (12)
Thanks for looking into it. Unfortunately I don't have access to EarPods and I haven't been able to find relevant information on how it works. Let me know if you find any details.
from radiant-player-mac.
It looks like the headphone button presses are low level IOHIDDevice
events. I think you have to look for devices that are buttons and then register for value change notifications. I'm relatively new to Apple's I/O kit, but I'll try to throw something together this week that can do this.
from radiant-player-mac.
Same thing happens with bluetooth headphones. The media keys control iTunes rather than Google Music
from radiant-player-mac.
Unfortunately I don't have bluetooth headphones with media controls, or Apple EarPods, so I can't develop this myself. I'm keeping this issue open in case anybody who has these and can develop a solution can contribute a pull request.
from radiant-player-mac.
The same happens when trying to use an Apple remote. The controls open iTunes instead of controlling Google Music. I would assume this could probably be corrected in the same way as the Apple EarPods or Bluetooth headphones.
from radiant-player-mac.
Since Snow Leopard pressing the EarPod button starts up iTunes instead of allowing one to control an already running media app. A Remote Control Daemon checks for that and opens up iTunes. There is no easy or proper way to do this, that is, other than modifying the rcd binary. [https://github.com/thebitguru/play-button-itunes-patch] This is also the reason no other app such as VLC, Spotify etc have this functionality.
I have also looked into the DDHIDLib which would be required to implement something like this after modifying the rcd binary but for me it only detected volume keys but not button presses.
So, I guess, its a won't fix unless someone takes the hack route.
from radiant-player-mac.
After digging a bit, I did see that the G-ear app accomplishes this by using a preference pane called Magic Keys that routes the button presses to the app. So it looks like you are correct, it may not be possible.
from radiant-player-mac.
Repo for Magic Keys: https://github.com/zsoltt/MagicKeys, maybe that helps.
from radiant-player-mac.
@se-bastiaan I tried Magic Keys, it lets me open Radiant if closed from remote on headphones but not pause/play.
from radiant-player-mac.
There is an app to fix bluetooth play/pause/next/prev issues for Spotify: https://github.com/jguice/mac-bt-headset-fix
from radiant-player-mac.
For anyone interested, whilst not a fix this can be implemented (at least with wired headphone buttons) using controllermate as described here:
http://apple.stackexchange.com/questions/52353/headphone-play-pause-button-controls-itunes-only
Create a new controllermate profile thing, press your button of choice and drag the controller onto the page.
Change the applescripts to reference Radiant Player rather than spotify, and also modify the "previous track" to "back track" (that stumped me for an hour or so before reading the cocoa definition file thingie)
from radiant-player-mac.
@afunix This works great for my needs! Thanks!
from radiant-player-mac.
Related Issues (20)
- Same song consistently skips at the same spot HOT 2
- Now Playing by Apple doesn't recognize the Radiant Player HOT 1
- On-disk cache is high (> 7GB)
- Dark Theme Album View Text Color HOT 1
- Media Player Keys no longer working HOT 14
- Volume level not persistent when launching application
- Support for YouTube Music HOT 1
- Crashes upon open in Mac OS Mojave HOT 28
- won't play individual songs, skips until asking to refresh page HOT 1
- Application will not restart after update in macOS Mojave HOT 5
- All control buttons disappear. HOT 7
- Crash on Mojave on menu item click HOT 1
- Crash when entering System Preferences or clicking system tray icon or going into music manager?
- Bug with multiple screens / desktops in sierra?
- Can't login Google HOT 4
- Appcast not up-to-date HOT 2
- Radiant Player crashes upon Mac OS Catalina HOT 1
- Mini player doesn't work (again) HOT 2
- Crash on Catalina HOT 1
- Can't Load Music Library HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from radiant-player-mac.