-
Notifications
You must be signed in to change notification settings - Fork 94
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
Demonstrate an alternative architectural approach #2431
base: main
Are you sure you want to change the base?
Conversation
… with the Media3 `Player` interface.
This looks promising. If you go to https://github.com/JolandaVerhoef/horologist/actions/workflows/fixup.yml, and run against your branch, it should fix API, screenshots and some lint. |
if (settingsState.podcastControls) { | ||
PlayerScreenPodcastControlButtons(playerUiController, playerUiState) | ||
} else { | ||
playerState?.let { player -> |
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.
This seems like it will be glitchy. blank on load then redraw.
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.
I wonder whether we can have some Null pattern instance of Player for loading?
Or it's better to know that the player isn't yet available, in case we are resuming and we might have some existing state we'd prefer to keep using? I don't think this is likely given a view model, but loading states in Flows that feed into a StateFlow are an antipattern because of this
@@ -83,14 +82,18 @@ fun UampWearApp( | |||
UampTheme { | |||
MediaPlayerScaffold( | |||
playerScreen = { | |||
UampMediaPlayerScreen( | |||
NewHotnessPlayerScreen( |
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.
Could we add a setting to https://github.com/google/horologist/blob/bf963e6fc02d9d794dc0a6f6702db9321407af95/media/sample/src/main/proto/settings.proto
And switch between these?
That way we can land this, and have a developer setting to toggle at runtime.
Approach is hard-linked with the Media3
Player
interface.WHAT
WHY
HOW
Checklist 📋