mirror of
https://github.com/binimum/tidal-ui.git
synced 2026-04-26 12:25:48 +03:00
[PR #3] [CLOSED] Add download progress tracking and mobile layout improvements to AudioPlayer #112
Labels
No labels
bug
duplicate
enhancement
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tidal-ui#112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/binimum/tidal-ui/pull/3
Author: @Copilot
Created: 10/5/2025
Status: ❌ Closed
Base:
main← Head:copilot/fix-4f9af99b-c92d-441e-8ce8-89a5f0af9bf3📝 Commits (2)
36a1eebInitial plan0c97c8aAdd downloads store and FFmpeg/track download banners📊 Changes
5 files changed (+557 additions, -76 deletions)
View changed files
📝
src/lib/api.ts(+50 -5)📝
src/lib/components/AudioPlayer.svelte(+155 -53)📝
src/lib/components/TrackList.svelte(+36 -9)📝
src/lib/ffmpegClient.ts(+70 -9)➕
src/lib/stores/downloads.ts(+246 -0)📄 Description
Overview
This PR enhances the AudioPlayer component with comprehensive download progress tracking, improved mobile layout, and better user control over downloads. All changes maintain backward compatibility and follow Svelte 5 best practices.
Features Added
1. FFmpeg Download Banner with Countdown
When FFmpeg WASM needs to be downloaded for metadata embedding, a banner now appears above the AudioPlayer with a 5-second countdown:
This gives users visibility into system-level operations and control over when FFmpeg loads.
2. Real-Time Track Download Progress
Each downloading track now displays a dedicated progress banner above the AudioPlayer:
Users can now monitor download progress and manage multiple downloads simultaneously.
3. Queue Panel Slide Animation
The queue panel now smoothly slides in and out with a 300ms transition when opened or closed, providing a more polished user experience.
4. Mobile-Optimized Two-Line Layout
The AudioPlayer now uses a responsive two-line layout on mobile devices (<640px):
Mobile:
Desktop (≥640px):
This fixes the issue where buttons covered the track title on mobile devices.
5. Download Cancellation
The download button in TrackList now shows an X icon while downloading (instead of a spinner). Clicking it immediately cancels the download:
AbortControllerfor clean fetch request cancellationTechnical Implementation
New Downloads Store
Created
src/lib/stores/downloads.tsto centralize all download state management:Progress Tracking
Enhanced
losslessAPI.downloadTrack()to support progress callbacks usingReadableStream:Clean Cancellation
Downloads can be cancelled cleanly using
AbortController:Responsive Design
Uses Tailwind CSS responsive classes for mobile/desktop layouts:
flex-colon mobile for stacked layoutflex-rowon desktop for horizontal layouthidden sm:flexpattern for mobile-hidden elementssm:breakpoint (640px)Files Changed
New:
src/lib/stores/downloads.ts(235 lines) - Downloads state managementModified:
src/lib/ffmpegClient.ts(+75 lines) - Countdown and progress trackingsrc/lib/api.ts(+45 lines) - Progress callbacks and AbortSignal supportsrc/lib/components/AudioPlayer.svelte(+120 lines) - Download banners, mobile layout, animationssrc/lib/components/TrackList.svelte(+40 lines) - Cancellation supportTotal: ~515 lines added/modified
Testing
Manual testing recommended for:
Screenshots
The implementation adds visual feedback for all download operations while maintaining the existing AudioPlayer design aesthetic. Download banners use the same dark theme with blue accents for system operations (FFmpeg) and gray for user actions (track downloads).
Fixes #[issue-number]
Original prompt
xt": "shoot "
},
{
"time": 228489,
"duration": 632,
"text": "across "
},
{
"time": 229121,
"duration": 3519,
"text": "the"
}
],
"element": {
"key": "L55",
"songPart": "Outro",
"singer": "v2000"
}
},
{
"time": 233064,
"duration": 5111,
"text": "That we shoot across the sky",
"syllabus": [
{
"time": 233064,
"duration": 224,
"text": "That "
},
{
"time": 233288,
"duration": 216,
"text": "we "
},
{
"time": 233504,
"duration": 398,
"text": "shoot "
},
{
"time": 233902,
"duration": 600,
"text": "across "
},
{
"time": 234502,
"duration": 216,
"text": "the "
},
{
"time": 234718,
"duration": 3457,
"text": "sky"
}
],
"element": {
"key": "L56",
"songPart": "Outro",
"singer": "v2000"
}
},
{
"time": 238296,
"duration": 3638,
"text": "That we shoot across the",
"syllabus": [
{
"time": 238296,
"duration": 298,
"text": "That "
},
{
"time": 238594,
"duration": 152,
"text": "we "
},
{
"time": 238746,
"duration": 349,
"text": "shoot "
},
{
"time": 239095,
"duration": 651,
"text": "across "
},
{
"time": 239746,
"duration": 2188,
"text": "the"
}
],
"element": {
"key": "L57",
"songPart": "Outro",
"singer": "v2000"
}
},
{
"time": 243701,
"duration": 5323,
"text": "That we shoot across the sky",
"syllabus": [
{
"time": 243701,
"duration": 270,
"text": "That "
},
{
"time": 243971,
"duration": 200,
"text": "we "
},
{
"time": 244171,
"duration": 368,
"text": "shoot "
},
{
"time": 244539,
"duration": 667,
"text": "across "
},
{
"time": 245206,
"duration": 381,
"text": "the "
},
{
"time": 245587,
"duration": 3437,
"text": "sky"
}
],
"element": {
"key": "L58",
"songPart": "Outro",
"singer": "v2000"
}
},
{
"time": 249395,
"duration": 3154,
"text": "That we shoot across the",
"syllabus": [
{
"time": 249395,
"duration": 316,
"text": "That "
},
{
...
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.