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

Improve media artwork display in MediaRouteControllerDialog #66

Open
wants to merge 6 commits into
base: RouteInfo_screenshots
Choose a base branch
from

Conversation

MGaetan89
Copy link
Member

Description

This PR improves the display of the media artwork so it no longer stretches in the MediaRouteControllerDialog.

Note

It's not possible to use network images in Compose Preview. I also didn't manage to use local images (unless the are in src/main, which is not what we want). So for now I'm drawing a simple image.

Changes made

@MGaetan89 MGaetan89 requested review from StaehliJ and Copilot April 7, 2025 08:21
@MGaetan89 MGaetan89 self-assigned this Apr 7, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 4 changed files in this pull request and generated no comments.

Files not reviewed (3)
  • mediarouter-compose/build.gradle.kts: Language not supported
  • mediarouter-compose/src/main/java/ch/srgssr/androidx/mediarouter/compose/MediaRouteControllerDialog.kt: Language not supported
  • mediarouter-compose/src/screenshotTest/java/ch/srgssr/androidx/mediarouter/compose/MediaRouteControllerDialogScreenshot.kt: Language not supported
Comments suppressed due to low confidence (1)

gradle/libs.versions.toml:67

  • [nitpick] The dependency name 'coil-compose-core' is very similar to the existing 'coil-compose' dependency; consider adding a comment or documentation to clarify the distinct purpose of each dependency to avoid confusion.
coil-compose-core = { group = "io.coil-kt.coil3", name = "coil-compose-core", version.ref = "coil" }

Copy link

github-actions bot commented Apr 7, 2025

Code Coverage

Overall Project 29.76% -2.35% 🟢
Files changed 21.88% 🟢

File Coverage
MediaRouteControllerDialogViewModel.kt 75.94% -2.26% 🟢
MediaRouteControllerDialog.kt 0% -11.22% 🟢

@MGaetan89 MGaetan89 force-pushed the 58-improve-image-display-in-the-mediaroutecontrollerdialog branch from 62c501f to 254d855 Compare April 7, 2025 08:30
@MGaetan89 MGaetan89 linked an issue Apr 7, 2025 that may be closed by this pull request
1 task
Copy link
Contributor

@StaehliJ StaehliJ left a comment

Choose a reason for hiding this comment

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

I can't see any image or metadata inside the MediaControllerView. It seems the mediaDescription inside the corresponding ViewModel doesn't update.

Screenshot_20250408_101101

@MGaetan89 MGaetan89 force-pushed the 58-improve-image-display-in-the-mediaroutecontrollerdialog branch from 9d7d318 to 4249c1b Compare April 8, 2025 15:17
@MGaetan89
Copy link
Member Author

I can't see any image or metadata inside the MediaControllerView. It seems the mediaDescription inside the corresponding ViewModel doesn't update.

Screenshot_20250408_101101

I've updated the PR so the artwork is displayed now. I've pushed a few commits for specific small changes, the main one being 9d7d318, where I introduce a MediaSession.

@MGaetan89 MGaetan89 force-pushed the RouteInfo_screenshots branch from 043be6c to a10ab27 Compare April 8, 2025 15:19
@MGaetan89 MGaetan89 force-pushed the 58-improve-image-display-in-the-mediaroutecontrollerdialog branch from 4249c1b to aafe8ee Compare April 8, 2025 15:19
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.

Improve image display in the MediaRouteControllerDialog
2 participants