Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds integration with MacOS native media APIs #258

Merged
merged 8 commits into from
Oct 20, 2023

Conversation

zackslash
Copy link
Contributor

@zackslash zackslash commented Oct 19, 2023

Overview:

Integrates Supersonic with native MacOS APIs making Supersonic the system 'NowPlaying' app, enabling native media controls and system display of 'now playing' media info.

Reasoning:

Feature requested & discussed via Discord.

Additional notes:

Build has only been tested on MacOS (Specifically Sonoma 14.0 on an M2 device).
It would be a good idea to ensure that this implementation does not break the build for any other platforms.
Note: Updated to exclude C files from non-darwin platforms. This should mean that the build does not break other platforms.

Resolves #233

Copy link
Owner

@dweymouth dweymouth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, thanks so much! Will review and test more in-depth this evening

backend/mpmediabridge.m Show resolved Hide resolved
player/player.go Show resolved Hide resolved
player/player.go Show resolved Hide resolved
@dweymouth
Copy link
Owner

dweymouth commented Oct 20, 2023

I realized when clicking on the bigger view that the back button is present - interesting - but we are not setting the playback time metadata. Is it possible to set this as well?

@zackslash
Copy link
Contributor Author

zackslash commented Oct 20, 2023

I realized when clicking on the bigger view that the back button is present - interesting - but we are not setting the playback time metadata. Is it possible to set this as well?

I saw this after my other comments so addressed this there (with the question on the back button).

But yes, this is a fair observation. Scrubber syncronisation and callbacks are considerably more involved if an app wants to sync real-time playback (Additional callbacks need to be implemented to maintain the sync state between the app player and the OS). They are optional to become the 'now playing' app, so omitted here. It's totally possible to implement though, I would suggest tackling it as a separate PR / feature (we can assign the task to me).

@dweymouth dweymouth merged commit 6aeaf07 into dweymouth:main Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate with Mac OS media player APIs
2 participants