-
Notifications
You must be signed in to change notification settings - Fork 14
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
Merged
123mpozzi
merged 14 commits into
feature/base-enable-lock-screen-controls
from
feature/enable-lock-screen-controls
Nov 7, 2024
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4f89231
Introduce `lockScreenControlConfig`
123mpozzi 8e10b3d
Add `lockScreenControlConfig.isEnabled` converters
123mpozzi cbbaaee
Add `LockScreenControlConfig` docs
123mpozzi 6274ad9
Add `isEnabled` docs
123mpozzi 9bfa60f
Add `lockScreenControlConfig` docs
123mpozzi 31a0d93
Deprecate `updatesNowPlayingInfoCenter`
123mpozzi c8989bf
Change confusing wording
123mpozzi 00451e7
Use ts docs notation for class link
123mpozzi 6907b4d
Generalize wording to be less iOS-specific
123mpozzi e6f1377
Remove unnecessary TODO
123mpozzi f0de732
Simplify wording
123mpozzi 76bc8fc
Add entry about `LockScreenControlConfig`
123mpozzi 8ebef4c
Add entry about deprecating `udpatesNowPlayingInfoCenter`
123mpozzi a0db607
Remove ending dot
123mpozzi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* Configures the lock screen information for the application. This information will be displayed | ||
* wherever current media information typically appears, such as the lock screen | ||
* and inside the control center. | ||
*/ | ||
export interface LockScreenControlConfig { | ||
/** | ||
* Enable the default behavior of displaying media information | ||
* on the lock screen and within the control center. | ||
* Default is `false`. | ||
* | ||
* For a detailed list of the supported features in the **default behavior**, | ||
* check the **Default Supported Features** section. | ||
* | ||
* @note Enabling this flag will automatically treat {@link TweaksConfig.updatesNowPlayingInfoCenter} as `false`. | ||
* | ||
* ## Limitations | ||
* --- | ||
* - At the moment, the current media information is disabled during casting. | ||
* | ||
* ## Known Issues | ||
* --- | ||
* **iOS**: | ||
* - There is unexpected behavior when using the IMA SDK. The Google IMA SDK adds its own commands | ||
* for play/pause as soon as the ad starts loading (not when it starts playing). Within this window | ||
* (approximately around 10 seconds), it is possible that both the ad and the main content are playing | ||
* at the same time when a user interacts with the lock-screen control feature. | ||
* | ||
* ## Default Supported Features | ||
* --- | ||
* Here is the list of features supported by the default behavior. | ||
* | ||
* ### Populated Metadata | ||
* - asset URL (to visualize the correct kind of data — _e.g. a waveform for audio files_) | ||
* - title | ||
* - artwork | ||
* - live or VOD status | ||
* - playback rate | ||
* - default playback rate | ||
* - elapsed time | ||
* - duration | ||
* | ||
* ### Registered Commands | ||
* - toggle play/pause | ||
* - change playback position | ||
* - skip forward | ||
* - skip backward | ||
*/ | ||
isEnabled?: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?There was a problem hiding this comment.
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