Skip to content

Feature/apple music artwork - #33

Open
HrishikeshBhandarkar wants to merge 4 commits into
maxrave-dev:multiplatformfrom
HrishikeshBhandarkar:feature/apple-music-artwork
Open

HrishikeshBhandarkar wants to merge 4 commits into
maxrave-dev:multiplatformfrom
HrishikeshBhandarkar:feature/apple-music-artwork

Conversation

@HrishikeshBhandarkar

Copy link
Copy Markdown

Apple Music Artwork Models, Scraper & 1080p ExoPlayer Track Selection

What this PR does

This PR introduces the backend data models and scraping service for Apple Music artwork and motion covers, along with a 1080p resolution cap on video playback in media3-ui.

This is the core companion PR required by the SimpMusic UI pull request for Apple Music Live Motion Artwork.

Changes

  1. Apple Music Artwork Scraper (lyricsService):

    • Added AppleMusicArtworkService and supporting data models (AMArtworkModels.kt).
    • Resolves Apple Music and iTunes albums/tracks to extract:
      • High-resolution static artwork URLs ({w}x{h}).
      • Animated motion cover HLS video streams (.m3u8 playlists for square and tall formats).
    • Exposed via SimpMusicLyricsClient and SimpMusicLyrics.
  2. Domain & Data Repositories (domain, data):

    • Added AppleMusicArtwork domain entity.
    • Bound scraper into LyricsCanvasRepository with getAppleMusicSongArtwork and getAppleMusicAlbumArtwork returning Flow<Resource<AppleMusicArtwork>>.
  3. 1080p Cap in ExoPlayer (media3-ui):

    • Configured DefaultTrackSelector in MediaPlayerView with setMaxVideoSize(1920, 1920).
    • Prevents ExoPlayer from selecting heavy 4K (2048x2732 / 1662x2216) HLS streams from Apple Music, saving battery and preventing playback stutter while maintaining full 1080p quality with adaptive streaming.
    • Added onPlayerError listener for diagnostics.

How it was tested

  • Unit tests run against AppleMusicArtworkService.
  • Verified HLS master playlist parsing with MediaPlayerView in both player and album screens.
  • Verified compilation with ./gradlew :media3-ui:compileDebugKotlin and :lyricsService:compileAndroidMain.

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.

1 participant