Wouter01 / MediaMate-Releases

72 stars 0 forks source link

Now Playing: Single App Mode #25

Open byung806 opened 5 months ago

byung806 commented 5 months ago

First of all, I'd like to say that this is a wonderful app! The animations and quality are astounding for and when I first saw it, I thought it was made by Apple. However, I noticed behavior in the app that may be a bug.

The Now Playing HUD play/pause button can sometimes play/pause the wrong playing item.

To Reproduce Steps to reproduce the behavior:

  1. Play thing 1 (in the Allowed Apps list)
  2. Play thing 2 (not in the Allowed Apps list)
  3. Hover over the notch, and verify the Now Playing HUD shows thing 1 (since thing 2 is not in the Allowed Apps)
  4. Hover over the notch and click the pause button
  5. See that the pause button pauses thing 2, even when the HUD shows thing 1

Expected behavior The play/pause button in the HUD should only control the playing item it's displaying.

Video https://github.com/Wouter01/MediaMate-Releases/assets/87292945/0c110e4a-c878-47ac-9b23-5ba0b1b81556

Could you look into this issue and verify if this is expected behavior? Thank you!

Wouter01 commented 5 months ago

Unfortunately, this is expected behavior. macOS only allows apps with a private entitlement (which can only be used by Apple apps) to send play / pause commands to multiple apps. Apps like MediaMate, which don't have that entitlement, can only send play / pause commands to the current playing app. Which app that is, is decided by macOS.

byung806 commented 5 months ago

Thank you for clarifying! I guess it's a security feature...

However, I came across this open source app BeardedSpice that uses custom website-specific javascript to control different apps. I installed it and it enables pausing apps in the background (for example, pausing a Spotify song in the background while a Youtube video is currently playing) using the media keys on the keyboard. Would you be open to look into how this is implemented in BeardedSpice and see if it's viable to use in MediaMate?

Again, thank you for your time!

Wouter01 commented 5 months ago

I have tried something similar to this before, and unfortunately it did not work well enough for me to ship it. I am planning to maybe add another mode for now playing, where the media keys (and therefore, the notch) would only control one application, for which specific support is added (Basically, Spotify & AM). Would such mode seem interesting to you? Depending on your intended usage of now playing, it may solve the issue

byung806 commented 5 months ago

Yes, that describes my exact use case! I currently only have Apple Music and Spotify enabled in the Allowed Apps and would love a music-only mode for Now Playing.

Also, I had a question - is there an option to enable forward/back skip buttons in the Now Playing HUD? If not, that's okay - it's not a needed feature.

Wouter01 commented 5 months ago

I have chosen to not add those, as I tried to keep it minimal, and the buttons are already on the keyboard

byung806 commented 5 months ago

That makes sense! The single button creates a cleaner look.

If you ever release a new music mode for Now Playing, I will be on the lookout. Thank you for your dedication and hard work!

Wouter01 commented 5 months ago

I have changed the title and will update this issue once the feature has been added :)

byung806 commented 5 months ago

Alright, sounds great! Thank you!