Improve mini-player and add periodic sync

- Redesign mini-player: progress bar on top, centered controls
- Add vertical volume slider with popup on hover
- Add volume percentage display
- Add custom speaker SVG icons
- Add periodic sync every 10 seconds for playback synchronization
- Broadcast user_joined when connecting via WebSocket
- Disable nginx proxy buffering for streaming
- Allow extra env variables in pydantic settings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-12 16:53:56 +03:00
parent f77a453158
commit 487da10365
11 changed files with 383 additions and 75 deletions

View File

@@ -203,6 +203,8 @@ async def stream_track(track_id: uuid.UUID, request: Request, db: AsyncSession =
"Accept-Ranges": "bytes",
"Content-Length": str(content_length),
"Content-Disposition": f"inline; filename*=UTF-8''{encoded_filename}",
"X-Accel-Buffering": "no",
"Cache-Control": "no-cache",
}
)
@@ -214,5 +216,7 @@ async def stream_track(track_id: uuid.UUID, request: Request, db: AsyncSession =
"Accept-Ranges": "bytes",
"Content-Length": str(file_size),
"Content-Disposition": f"inline; filename*=UTF-8''{encoded_filename}",
"X-Accel-Buffering": "no",
"Cache-Control": "no-cache",
}
)

View File

@@ -46,6 +46,13 @@ async def room_websocket(websocket: WebSocket, room_id: UUID):
await manager.connect(websocket, room_id, user.id)
# Notify others that user joined
await manager.broadcast_to_room(
room_id,
{"type": "user_joined", "user": {"id": str(user.id), "username": user.username}},
exclude_user=user.id
)
try:
while True:
data = await websocket.receive_text()