Giter Site home page Giter Site logo

Comments (32)

Coder-256 avatar Coder-256 commented on August 17, 2024 2

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.

keyboardsurfer avatar keyboardsurfer commented on August 17, 2024

They might send their commands via Bluetooth and get intercepted by the OS.

from beardedspice.

FlorianFranzen avatar FlorianFranzen commented on August 17, 2024

Do you talk about wireless headphones? Can you name a specific brand, etc?

from beardedspice.

keyboardsurfer avatar keyboardsurfer commented on August 17, 2024

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.

trhodeos avatar trhodeos commented on August 17, 2024

Looking into this today.

from beardedspice.

trhodeos avatar trhodeos commented on August 17, 2024

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.

FlorianFranzen avatar FlorianFranzen commented on August 17, 2024

@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.

trhodeos avatar trhodeos commented on August 17, 2024

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.

trhodeos avatar trhodeos commented on August 17, 2024

@FloFra: I pushed up the prev/next code into tr.headset. I'll work on the volume bits later tonight.

from beardedspice.

MrBMT avatar MrBMT commented on August 17, 2024

@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.

 avatar commented on August 17, 2024

I'd love this too :)

from beardedspice.

jayrhynas avatar jayrhynas commented on August 17, 2024

I managed to get volume keys working, opened pr #77

from beardedspice.

dagguh avatar dagguh commented on August 17, 2024

Nokia BH-905i as well please ^_^

from beardedspice.

matthewdias avatar matthewdias commented on August 17, 2024

will this ever be merged to the main branch? actually it seems like a good candidate for a pr for spmediakeytap

from beardedspice.

Stillness-2 avatar Stillness-2 commented on August 17, 2024

At the moment I cannot say anything certain. I need to look at this. :)

from beardedspice.

Stillness-2 avatar Stillness-2 commented on August 17, 2024

Can anybody check last master branch? I don't have a Bluetooth headset. :)

from beardedspice.

matthewdias avatar matthewdias commented on August 17, 2024

Unless I'm mistaken this branch was for all headphones with remotes, not just bluetooth ones.

from beardedspice.

Stillness-2 avatar Stillness-2 commented on August 17, 2024

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.

Coder-256 avatar Coder-256 commented on August 17, 2024

I have a solution! Here are the steps:

  1. Download ControllerMate (direct link).
  2. Open the programming page I made, which can be downloaded here (direct link).
  3. Enjoy!

from beardedspice.

Stillness-2 avatar Stillness-2 commented on August 17, 2024

Please check this debug build: https://www.dropbox.com/s/ubj1dzvqkwtneud/BeardedSpice.zip?dl=1

from beardedspice.

buffaloseven avatar buffaloseven commented on August 17, 2024

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.

Stillness-2 avatar Stillness-2 commented on August 17, 2024

what BS version do you have?

from beardedspice.

Coder-256 avatar Coder-256 commented on August 17, 2024

@buffaloseven

Try this with ControllerMate (the free version should work fine). It seems that BeardedSpice does not support volume change with headphone buttons.

from beardedspice.

Stillness-2 avatar Stillness-2 commented on August 17, 2024

"It seems that BeardedSpice does not support volume change with headphone buttons." It is not ture. :)

from beardedspice.

Coder-256 avatar Coder-256 commented on August 17, 2024

@Stillness-2 Really? It never worked for me, so I just assumed it was inexistent.

from beardedspice.

buffaloseven avatar buffaloseven commented on August 17, 2024

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.

Stillness-2 avatar Stillness-2 commented on August 17, 2024

@buffaloseven Try this https://raw.github.com/beardedspice/beardedspice/distr/publish/releases/BeardedSpice-latest.zip

from beardedspice.

bcomnes avatar bcomnes commented on August 17, 2024

@Stillness-2 would someone purchasing you a pair of bluetooth headphones to test with increase the chance of this getting implemented?

from beardedspice.

1ps0 avatar 1ps0 commented on August 17, 2024

Since it's not showing up in the thread, a dupe ticket #33 had good discussion and commentary on this same topic.

from beardedspice.

rodibin-at-placemaildotonline avatar rodibin-at-placemaildotonline commented on August 17, 2024

This doesn't work on the samsung buds unfortunately

from beardedspice.

rodibin-at-placemaildotonline avatar rodibin-at-placemaildotonline commented on August 17, 2024

Thanks for the great detailed documentation. Unfortunately I use Firefox, any word on that project?

from beardedspice.

Coder-256 avatar Coder-256 commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.