Comments (32)
This project is basically dead AFAIK... now most browsers and many websites natively support media keys and headphone buttons in Sierra and later. This includes Safari for a long time (edit: introduced here; OS support for macOS came later) and now all Chromium browsers (introduced here). For more information on Chromium's internals for this, see "Controlling Media Playback".
Anyway there is now actually a draft standardized API for websites to implement. Basically now websites can have their own equivalent of BeardedSpice's "media strategies" (now called "media sessions"). See the WICG Media Session Standard draft for more info on how websites can support this functionality (this has been in the works for years now, and better macOS support has recently been implemented in many browsers as I mentioned before).
from beardedspice.
They might send their commands via Bluetooth and get intercepted by the OS.
from beardedspice.
Do you talk about wireless headphones? Can you name a specific brand, etc?
from beardedspice.
Yes I'm talking about bluetooth headphones. Currently I'm using the Sony MDR-1RBT which contain Play/Pause, Skip forward and backward buttons.
from beardedspice.
Looking into this today.
from beardedspice.
So I have a preliminary version up, which only supports play/pause for my headphones (the only ones I can test). The code is up in the branch tr.headset
. A zip containing the pre-built app is available here.
Because my headphones don't have forward/prev support, I need to get some more info from you guys. Run BS with:
./BeardedSpice-mikey-support.app/Contents/MacOS/BeardedSpice
Press the forward/previous buttons. You should see a log message saying something like 'Unknown keypress 138'. Let me know what that number is for each button and I will add support for them. I hope that these values are fairly standardized...
NOTE: As of right now, I only grab the available 'mikey HID devices' at startup. So, if you plug it in later, BS won't detect it. Also, BS will seize control of the device controls, so key presses won't bubble up to the system (see: itunes, volume control, etc). That's good for iTunes, but bad for volume control.. I'm trying to figure out a good solution to this with DDHidLib.
@FloFra @josefalcon @keyboardsurfer
from beardedspice.
@trhodeos: Thank you for the quick update. I am not sure why you closed issue #31 and posted your answer here instead. I thought this here is about Bluetooth headphones? Or are they using the mikey HID device as well?
Now to your question: There is no forward or previous button on most apple certified headphones. Pressing the play button twice is forward (keypress id 138) while pressing it three times is backwards (keypress id 139). This means your headphones should support skipping tracks as well, all that is missing is mapping the ids properly.
The simplest fix to the volume issue would be to react to the volumes buttons as well (volume up is id 140 and volume down is 141). Another fix, that at least works for me on Mavericks, is to un- and replug the headphone after I started BeardedSpice.
from beardedspice.
Ah, I misunderstood. I'll open another issue for bluetooth-specific support. I don't have a bluetooth device, so it'll be hard for me to add support (until I find one to borrow).
Ah, ok, that makes sense. I'll map those ids as well.
from beardedspice.
@FloFra: I pushed up the prev/next code into tr.headset
. I'll work on the volume bits later tonight.
from beardedspice.
@trhodeos Just thought I'd mention that the zip containing the pre-built app you provided seems to work fine (for play/pause) with Apple EarPods.
Hopefully the following is of some use (Using EarPods):
Volume Up press:
2014-03-12 15:32:55.299 BeardedSpice[4128:507] Unknown key press seen 140
Volume Down press:
2014-03-12 15:33:19.434 BeardedSpice[4128:507] Unknown key press seen 141
2014-03-12 15:33:19.434 BeardedSpice[4128:507] Unknown key press seen -1
Next track (Double Play click):
2014-03-12 15:35:02.615 BeardedSpice[4128:507] Unknown key press seen 138
Previous track (Triple Play click):
2014-03-12 15:36:07.252 BeardedSpice[4128:507] Unknown key press seen 139
2014-03-12 15:36:07.252 BeardedSpice[4128:507] Unknown key press seen -1
Seems to match what FloFra provided (other also having the -1 parts).
Thanks for beardedspice by the way, great App!
from beardedspice.
I'd love this too :)
from beardedspice.
I managed to get volume keys working, opened pr #77
from beardedspice.
Nokia BH-905i as well please ^_^
from beardedspice.
will this ever be merged to the main branch? actually it seems like a good candidate for a pr for spmediakeytap
from beardedspice.
At the moment I cannot say anything certain. I need to look at this. :)
from beardedspice.
Can anybody check last master branch? I don't have a Bluetooth headset. :)
from beardedspice.
Unless I'm mistaken this branch was for all headphones with remotes, not just bluetooth ones.
from beardedspice.
It seems that it is so. :) I'm asking to check on Bluetooth headphones. :) Because I already tested the remote on the headphones for iPhone.
from beardedspice.
I have a solution! Here are the steps:
- Download ControllerMate (direct link).
- Open the programming page I made, which can be downloaded here (direct link).
- Enjoy!
from beardedspice.
Please check this debug build: https://www.dropbox.com/s/ubj1dzvqkwtneud/BeardedSpice.zip?dl=1
from beardedspice.
The debug build seems to help, but I often have volume changes from the headset buttons not recognized by the system when BeardedSpice is active.
from beardedspice.
what BS version do you have?
from beardedspice.
Try this with ControllerMate (the free version should work fine). It seems that BeardedSpice does not support volume change with headphone buttons.
from beardedspice.
"It seems that BeardedSpice does not support volume change with headphone buttons." It is not ture. :)
from beardedspice.
@Stillness-2 Really? It never worked for me, so I just assumed it was inexistent.
from beardedspice.
I'm using the 1.2.3 (0) debug build. It seems to be intercepting the system-level volume changes sent from the headphone remote. Running El Capitan 10.11.4.
from beardedspice.
@buffaloseven Try this https://raw.github.com/beardedspice/beardedspice/distr/publish/releases/BeardedSpice-latest.zip
from beardedspice.
@Stillness-2 would someone purchasing you a pair of bluetooth headphones to test with increase the chance of this getting implemented?
from beardedspice.
Since it's not showing up in the thread, a dupe ticket #33 had good discussion and commentary on this same topic.
from beardedspice.
This doesn't work on the samsung buds unfortunately
from beardedspice.
Thanks for the great detailed documentation. Unfortunately I use Firefox, any word on that project?
from beardedspice.
Unfortunately I don't think Firefox is supported yet (I could be wrong though). It's still a draft specification add it doesn't have mainstream support yet. MDN is probably a good place to check for updates on browser support.
from beardedspice.
Related Issues (20)
- menubar icon doesn't auto change to correct color. HOT 1
- Apple Silicon (version)
- [App Support]
- [App Support] Stremio
- [App Support] Broadcasts by Steven Troughton-Smith
- [App Support] HOT 2
- Why does BeardedSpice need access to the Downloads folder? HOT 1
- Chrome: Tidal Web Player: "require is not defined"
- [App Support] Arc Browser
- [App Support] Prism + Plex Amp
- [App Support]
- [App Support] Add Amazon Music App
- Safari PWA YT Music not recognized
- Disable all media controllers in bulk
- [App support] Psst
- [App support] re:AMP HOT 1
- [App Support] Update MusicForProgramming strategy HOT 1
- [App Support] Website Support for Arte.tv
- How to stop Spotify or youtube from popping up everytime i select one to control?
- [App Support] soundstripe.com
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 beardedspice.