[ANNOUNCE] headset-control : Make the headset button actually manipulate tracks.
1 Attachment(s)
This daemon monitors when the button on the headset is pressed and makes the media player pause the playing song.
Download: Attached. Install instructions :
Credits:
Media players supported by the default configuration:
"Configurations" available: Default - This config uses dbus-send to send a pause message to the osso-media-server. So this config would only work with those players that use osso-media-server. MPlayer - This one uses key-presses sent via xte to manipulate mplayer. Pressing the headset button will send a Return key press and pause the playing video. Your Own. - Make your own command run when you press the button. If your program can be controlled by dbus, run dbus-monitor and make a dbus-send command. Or if by key presses, find out which one and make xte send that key press. Also, for example, on the bitsmithy website, there is a command to run flite to speak the time. The original script to do this with a Bluetooth headset used xte to control the built in media player. I replaced that xte command with the dbus one as it didn't require focus to be on the media player window. I don't really have an easy way to switch so edit /usr/bin/hsetctrl.py as root, manually. I've put comments in the file. *For canola, it only works for playing/pausing the music by default as that uses osso-media-server. Movies won't work for example because that uses mplayer. But it wouldn't be hard to find the key press event and make the headset-control app run that instead. (BTW. If anyone is into headset modding, grab the kernel source and look at retu-headset.c) (If you get unable to install (it probably won't say that but for me it does (with EVERY program that adds something to init), do this: sudo gainroot mv /etc/rc2.d/S99hsetctrl /etc/rc2.d/S99hsetctrl1 apt-get -f install mv /etc/rc2.d/S99hsetctrl1 /etc/rc2.d/S99hsetctrl ) EDIT: Version 0.2 uploaded. Little bugs fixed. |
Re: [ANNOUNCE] headset-control : Make the headset button actually manipulate tracks.
I needed the python-dbus support installed.
Also, it doesn't seem to work. I have an aliph jawbone on an n810 with diablo. I get: Code:
signal sender=:1.0 -> dest=(null destination) path=/com/nokia/osso_hp_ls_controller; interface=com.nokia.osso_hp_ls_controller.headset; member=button_pressed |
Re: [ANNOUNCE] headset-control : Make the headset button actually manipulate tracks.
Well, this is for the wired headset. (My bad, I should have mentioned that). if you want to use a bluetooth headset, check out www.bitsmithy.net
|
Re: [ANNOUNCE] headset-control : Make the headset button actually manipulate tracks.
I forgot the original headset had that button. Actually this might be even better.
|
Re: [ANNOUNCE] headset-control : Make the headset button actually manipulate tracks.
I always wondered what that even did by default (I never figured it out).
|
Re: [ANNOUNCE] headset-control : Make the headset button actually manipulate tracks.
That's great!! Working fine with the bundle headset, Thanks!:)
But seem like can't work with my another headset, which is come with my N81 phone :( Saka |
Re: [ANNOUNCE] headset-control : Make the headset button actually manipulate tracks.
Quote:
|
Possible to make it compatable with both blutooth button as well as wired buton?
Would it be possible to make this compatible with both bluetooth headset button as well as wired button?
That would be much appreciated among the community. Or even dream up a way that makes it possible for people to easily change the event of the button press from a seprate file so that the function of the button can be changed easily simply by overwriting a file. but really, the community has been waiting for a way to pause canola with a bluetooth headset button for a very very long time. Thanks for the work. |
Re: [ANNOUNCE] headset-control : Make the headset button actually manipulate tracks.
I tried to hack this together myself.
But its not working. I used the deb installer and replaced /usr/lib/hsetvtrl/hsetctrl.py with the below script which used dbus to start and stop canola/mplayer. If i run just 'dbus-send --dest=com.nokia.osso_media_server /com/nokia/osso_media_server com.nokia.osso_media_server.music.pause' in the terminal while canola is running I get a working play/pause system. However this does not work when trying to use it in the script below. Here's the script I am using: Code:
#!/usr/bin/env python2.5 |
Re: [ANNOUNCE] headset-control : Make the headset button actually manipulate tracks.
Hi
I see there has been no activity for some time on this thread but I will still give my question a try: What are the commands to put into the code to enable play/pause while having Canola configured with mplayer for the music? Background is that I want to use mplayer in stead of oms in Canola to boost the volume. I also want the play/pause functionality described here which works very nicely with oms running for music. So I now just want best of both worlds ;-) |
All times are GMT. The time now is 20:47. |
vBulletin® Version 3.8.8