How naivg/bilimusic works
BiliMusic is a cross-platform Bilibili-focused audio player, with search and discovery, playlist management, playback, lyrics and themes, offline caching, and LAN device synchronization. Its documented main workflow runs from search or recommendations through playlist/queue management to playback; roaming can extend the queue, and LAN peers can synchronize playback state and control. The README also documents a separate Xiaomi Vela client. The supplied tree omits the Flutter application sources, so those product components are represented from README documentation; sampled implementation detail is limited to Vela services.
Main entry points: playerService.js Vela Client · authService.js Authentication · api.js Vela API Bridge · session.js Session State
Components 23
Discovery
- App UI
- Search & Recommendations
- Roaming Service
- Bilibili API
Playback
- Player Coordinator
- Audio Engine
- Lyrics & Themes
- Offline Audio Cache
Account & Data
- Playlists & Favorites
- Local Data Store
- Authentication
vela/src/services/authService.js - Session State
vela/src/services/session.js - Vela Storage
vela/src/services/storage.js
Client Integrations
- LAN Sync
- Vela Client
vela/src/services/playerService.js - Vela API Bridge
vela/src/services/api.js - Fetch Bridge Protocol
vela/src/common/fetchbridge.js - Vela Audio System
- Vela Device System
vela/src/services/deviceService.js - Vela App System
vela/src/services/appService.js
Other components
- Listener
- Peer Devices
- Bilibili Service
Connections 28
- Listener → App UI: uses
- App UI → Search & Recommendations: requests discovery
- Search & Recommendations → Bilibili API: queries
- Bilibili API → Bilibili Service: requests content
- App UI → Playlists & Favorites: manages tracks
- Playlists & Favorites → Local Data Store: persists
- App UI → Player Coordinator: controls playback
- Player Coordinator → Audio Engine: drives audio
- Player Coordinator → Offline Audio Cache: caches tracks
- Player Coordinator → Lyrics & Themes: updates presentation
- Player Coordinator → Roaming Service: requests queue additions
- Roaming Service → Search & Recommendations: discovers related tracks
- Roaming Service → Bilibili API: fetches candidates
- App UI → LAN Sync: configures sync
- LAN Sync → Peer Devices: discovers and pairs
- LAN Sync → Player Coordinator: synchronizes playback
- Listener → Vela Client: uses
- Vela Client → Vela API Bridge: requests media
- Vela API Bridge → Bilibili Service: fetches content
- Vela API Bridge → Fetch Bridge Protocol: uses when available
- Vela Client → Vela Storage: reads and writes
- Vela Client → Vela Audio System: controls audio
- Vela Client → Authentication: starts login
- Authentication → Bilibili Service: requests QR and profile
- Authentication → Session State: saves credentials
- Session State → Vela Storage: persists session
- Vela Client → Vela Device System: reads capabilities
- Vela Client → Vela App System: reads app information