[Feature]: Desktop app: music and Listen Together
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 15/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust, typescript
- Lĩnh vực
- audio-video-rtc, backend, desktop
Hướng nghiên cứu
Read epic #80 and prerequisite issues #82 and #83 first, then compare the web player in web/src/music/, especially decoder.worker.ts, engine.ts, and listen.ts, with the shared queue logic in packages/shared/src/music.ts and its music.test.ts tests. The issue calls for a native desktop audio engine, player UI, queue synchronization, and Listen Together integration across several subsystems. Done means gapless playback, matching crossfade and ReplayGain behavior, shared queue continuity, and Listen Together compatibility with web members.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[!NOTE]
This issue was written by Claude (Claude Opus 5.5) from a planning session with @PhrolovaMoe. Part of #80, builds on #82 and #83. Read the epic first.
Area
Desktop app
Problem
Music on the web is a fully custom, hi-fi player: untranscoded playback, sample-accurate gapless, crossfade and ReplayGain, a server-side queue shared with Subsonic clients, and Listen Together. The app needs the same thing natively, not through mpv.
Proposed solution
Engine
- Decode with
decoder/core(symphonia, gaplesssequence, resampling to the output rate), exactly as the web worker does (web/src/music/decoder.worker.ts,engine.ts). - Read files through a
Read + Seekadapter over HTTP Range requests on/api/music/tracks/{id}/file, with the same fallback the web uses (…/flacfor lossless formats the decoder can't read,…/streamonly when the user asks for lossy). - Output with cpal. On Linux that's the ALSA host, which reaches PipeWire/PulseAudio through their ALSA plugins. Use the device's default rate and follow the default device when it changes.
- A lock-free ring between the decode thread and the cpal callback, like the web's
ring.ts/worklet.ts. The position comes from frames actually played, as on web. - ReplayGain Off/Track/Album/Auto (default Auto), crossfade (off by default, never between consecutive tracks of the same album), and volume, all as on web.
Player logic
- Port
packages/shared/src/music.ts(queue, repeat/shuffle, keeping the server's play queue in step) to Rust, with its tests (music.test.ts) ported too. Behaviour must match, because web, Android and Subsonic clients share the server's queue. Send theclientargument onnowPlaying/savePlayQueueas the other apps do. - Starting a video, clip or room pauses music and hides the pill; leaving it brings the pill back paused. The pill can only be closed while paused. The queue persists. All as on web.
UI
The web is the spec (web/src/music/):
- Library (Albums / Artists / Songs / Playlists) in the sidebar's music library,
routes/album.$id.tsx,artist.$id.tsx,playlist.$id.tsx. - The bottom-centre pill → floating card → full-screen Now Playing (Lyrics / Queue / Info) with synced lyrics, tinted from the artwork (
Pill.tsx,NowPlaying.tsx,controls.tsx,components.tsx). - Stars, ratings, playlists, history: the same mutations.
Listen Together
Port web/src/music/listen.ts and routes/listen.$code.tsx: the listen WebSocket (/api/listen/{code}/ws), the room's routes for files/covers/avatars, guests without sign-in, and joining from tinystream://<host>/listen/<code> and web URLs (the entry point is called by #92).
MPRIS for music is wired in #92. Expose the player state it needs (metadata, art URL, position, rate, controls).
Done when
An album with gapless transitions plays without a gap or click. Crossfade and ReplayGain sound the same as on web. The queue picked up on web continues in the app and the other way round. Listen Together works with web members. CPU use while playing is low (well under a browser tab playing the same).
- Ngôn ngữ chính
- TypeScript
- Star
- 4
- Fork
- 1
- Merge trung bình
- 4 giờ 49 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tinystream-dev/tinystream
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
tinystream-dev/tinystream#132 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
tinystream-dev/tinystream#131 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
tinystream-dev/tinystream#129 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
tinystream-dev/tinystream#128 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
tinystream-dev/tinystream#124 ·
Tất cả issue của tinystream-dev/tinystream
Issue tương tự
-
Console writes URL credentials to the local log, though AGENTS.md says secrets never reach diskĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
sandbox-quantum/switch#2163 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
automated issue report
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/dashboard kind/bug QA/dev-automation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug pydanty:is-working
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
pydantic/pydantic-ai#13939 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
self-host
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
funmusicplace/mirlo#2625 ·
Maintainer thường phản hồi trong vòng 1 ngày