HomeConMenu icon indicating copy to clipboard operation
HomeConMenu copied to clipboard

[FEATURE REQUEST] Control HomePod playback

Open Rastafabisch opened this issue 1 year ago • 13 comments

Feature Request MockUp
Thank you so much for providing this great peace of software!I was wondering whether it would be possible to add HomePod playback control to HomeConMenu. As providing a simple previous, play/pause, next interface. And it would also be nice if, whenever the HomePod is playing the keyboard media keys could be forwarded to control the playback.I made a little mockup to illustrate how I imagine it. HomePod-Control_MockUp

Rastafabisch avatar Sep 20 '24 09:09 Rastafabisch

Thank you for your localization and new ideas!

I have not found the way to control HomePods.... If you have any good ideas, let me know.....

sonsongithub avatar Sep 22 '24 01:09 sonsongithub

There could be some kind of API within the Music App, as it does allow to control the HomePods Playback from within macOS. Playing and Pausing audio as well as adjusting the loudness (to some extend) is available via Shortcuts (App) from macOS - So I think it should be controllable via the AppIntends API.

Rastafabisch avatar Sep 22 '24 12:09 Rastafabisch

I found DAAP that is used by Apple's Remote.app to control macOS Music.app from iPhone. But, DAAP is not an open protocol. I can not find the way to access Music.app.....

sonsongithub avatar Sep 22 '24 13:09 sonsongithub

Finally, AppleScript is the only way to do it...?

sonsongithub avatar Sep 22 '24 13:09 sonsongithub

This might be of some help.

Rastafabisch avatar Sep 22 '24 13:09 Rastafabisch

We could not use DAAP in order to control iTunes(Music).app. Apple added authentication procedures to DAAP.

https://en.wikipedia.org/wiki/Digital_Audio_Access_Protocol

sonsongithub avatar Sep 23 '24 09:09 sonsongithub

Could this be an option? I just incorporated this into a little tool I ported from iTunes.

Rastafabisch avatar Oct 31 '24 05:10 Rastafabisch

It looks nice. I've already started to use this framework. https://github.com/sonsongithub/AppleScriptBridge

Now, I'm wondering whether to use ScriptingBridge or not.

sonsongithub avatar Oct 31 '24 11:10 sonsongithub

I just checked the framework. It appears to use the exact same (generated) Music.h file. Can't speak for the bridge part though.

Rastafabisch avatar Oct 31 '24 11:10 Rastafabisch

Yes, you are right. In addition, I created a converter from Obj-C header file to Swift interface.

sonsongithub avatar Oct 31 '24 13:10 sonsongithub

Great work! I'm looking forward to try the new feature, when it is ready.


Looking at you AppleScriptingBridge repository it might be a helpful information, that for SystemEvents permission allowances I needed to modify the applications Info.plist. This one took me some time to figure out, why it didn't work at first.

Rastafabisch avatar Oct 31 '24 17:10 Rastafabisch

I built an experimental application. Next, I plan to integrate this into HomeConMenu.

https://github.com/sonsongithub/MusicConMenu

sonsongithub avatar Nov 09 '24 12:11 sonsongithub

Join test. https://testflight.apple.com/join/y4dGUJmu

sonsongithub avatar Nov 25 '24 15:11 sonsongithub