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

iOS: support Media Controls #532

Conversation

123mpozzi
Copy link
Contributor

@123mpozzi 123mpozzi commented Oct 7, 2024

Description

Introduce the lock-screen control config!
Use it to make the system display the current media information on the lock-screen, in notifications, and within the control-center

PR-planning

Overview Pics

image image image

Changes

Introduce LockScreenControlConfig

  • Currently it only supports isEnabled to enable/disable the feature

Deprecate TweaksConfig.updatesNowPlayingInfoCenter

Test

Manually test the integration being turned on/off by adding the new config into a sample (e.g. BasicPlayback):

  const player = usePlayer({
    remoteControlConfig: {
      isCastEnabled: false,
    },
+    lockScreenControlConfig: {
+      isEnabled: true,
+    },
  });

Checklist

  • 🗒 CHANGELOG entry

@123mpozzi 123mpozzi self-assigned this Oct 7, 2024
@123mpozzi 123mpozzi changed the title Enable Lock-Screen Controls iOS: Enable Lock-Screen Controls Oct 7, 2024
@123mpozzi 123mpozzi changed the base branch from development to feature/base-enable-lock-screen-controls October 7, 2024 14:54
@123mpozzi 123mpozzi marked this pull request as ready for review October 7, 2024 15:09
@123mpozzi 123mpozzi requested a review from a team as a code owner October 7, 2024 15:09
Copy link
Contributor

@hawk23 hawk23 left a comment

Choose a reason for hiding this comment

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

Let's wait until we know how the Android part will look like before proceeding here. If the introduced config will only be available for iOS, I would prefer to match the naming to what we have on iOS

* wherever current media information typically appears, such as the lock screen
* and inside the control center.
*/
export interface LockScreenControlConfig {
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that this will be most likely only for iOS, would it make sense to use NowPlayingConfig as a name to match what we have in iOS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the config will also be available for Android, I would keep the naming as LockScreenControlConfig

@123mpozzi 123mpozzi mentioned this pull request Oct 18, 2024
1 task
@123mpozzi 123mpozzi requested a review from hawk23 October 18, 2024 12:38
@123mpozzi 123mpozzi changed the title iOS: Enable Lock-Screen Controls iOS: support Media Controls Nov 6, 2024
@123mpozzi 123mpozzi merged commit 1c7cfe2 into feature/base-enable-lock-screen-controls Nov 7, 2024
7 checks passed
@123mpozzi 123mpozzi deleted the feature/enable-lock-screen-controls branch November 7, 2024 10:34
@123mpozzi 123mpozzi mentioned this pull request Nov 7, 2024
1 task
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.

2 participants