M
Back to Projects
AndroidCompleted2026

Wave Player

A production-grade music player for Android and the web with a native Media3 playback engine, a real local library, synced lyrics, phone-to-phone sharing and a theme engine that paints the interface from the album artwork.

mhyar.ir/projects/wave-player
Wave Player2026
Type:
Android
Year:
2026
Status:
Completed
Technologies
13
01

Overview

Wave Player is a music player built as a single React and TypeScript codebase that ships to Android through Capacitor while the same interface runs in the browser. On Android, playback lives in a native Media3/ExoPlayer foreground service rather than the WebView, so audio survives backgrounding, screen-off and process death while the JavaScript layer mirrors what the native player is doing through a typed Capacitor plugin. The app indexes the local library into SQLite, reads embedded metadata and artwork, and builds albums, artists, genres, playlists, favorites and play history on top of it. Its theme engine extracts a perceptual palette from the current cover, enforces WCAG contrast, and offers 23 presets. It ships synced lyrics with encoding-tolerant .lrc import and an online lookup service, phone-to-phone library sharing over the local network with QR pairing, live metadata and cover editing, a sleep timer, an equalizer and full English/Persian RTL support. A companion Go service at waveplayer.ir serves the product page, the lyrics API, app updates and the release dashboard.

02

Key Features

Native Background Playback with Media3
Real Local Library with Metadata and Artwork
Full Queue System with Shuffle and Repeat
Artwork-Driven Theme Engine with 23 Themes
Synced Lyrics with .lrc Import and Online Lookup
Phone-to-Phone Library Sharing over Wi-Fi
Live Metadata and Cover Editing
Fast Fuzzy Search and Script-Aware A–Z Rail
Equalizer, Sleep Timer and Playback Speed
In-App Update Notices and Minimum-Version Gate
Bilingual English / Persian RTL Interface
03

Development Process

Challenges Faced

  1. 01

    Serving one interface from two unrelated playback engines, HTML5 audio in the browser and a native Media3 service on Android, without the UI seeing the difference

  2. 02

    Keeping playback alive through backgrounding, screen-off and process death while the JavaScript state stays honest about what the native player is doing

  3. 03

    Deriving a readable palette from arbitrary album artwork and applying it across 23 themes, light and dark modes and RTL layouts

  4. 04

    Handling real-world lyrics: mixed encodings, drifting timestamps and songs that simply have none, on a service that must fail quietly when offline

  5. 05

    Editing track metadata and artwork while that track is playing, without interrupting playback or leaving the notification and lock screen showing stale data

Solutions Implemented

  1. 01

    Put playback behind a shared PlayerService contract with web and Android adapters; the native service owns the queue and position and sends throttled, batched position events that JS mirrors

  2. 02

    Persisted playback state, a foreground media service with audio focus and headphone handling, and queue/position snapshots written on a trailing throttle and on page hide

  3. 03

    A perceptual palette extractor with WCAG-aware contrast enforcement and theme tokens that work in both writing directions without a second stylesheet

  4. 04

    Encoding-tolerant .lrc and .txt import, per-line timestamps with a manual offset, cached remote lookups with a negative cache, and no bundled placeholder lyrics

  5. 05

    Replacing the media item inside the live Media3 queue at the same position when tags change, so the UI, notification and lock screen all update without a track change