mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 02:24:16 +00:00
- Add WebSocket-based sync room for real-time music playback sync. - Expand music exploration search to include albums and artists. - Adjust track and release data fetching and deletion on server. - Enhance DASH segmentation job with codec overrides and MPD updates. - Update music service configuration for websockets and middlewares. - Make minor UI adjustments to the search component.
14 lines
311 B
JavaScript
14 lines
311 B
JavaScript
import leave from "./leave"
|
|
|
|
export default async (client, user_id) => {
|
|
console.log(`[SYNC-ROOM] Join ${client.userId} -> ${user_id}`)
|
|
|
|
if (client.syncroom) {
|
|
await leave(client, client.syncroom)
|
|
}
|
|
|
|
// subscribe to stream topic
|
|
await client.subscribe(`syncroom/${user_id}`)
|
|
client.syncroom = user_id
|
|
}
|