Skip to content

Add Syncplay support#147

Merged
MakD merged 2 commits into
masterfrom
syncplay-support
Jun 1, 2026
Merged

Add Syncplay support#147
MakD merged 2 commits into
masterfrom
syncplay-support

Conversation

@MakD
Copy link
Copy Markdown
Owner

@MakD MakD commented Jun 1, 2026

This commit introduces SyncPlay functionality, enabling users to create, join, and manage "Watch Parties" for synchronized playback. It includes a time synchronization engine to handle clock skew, real-time coordination via Jellyfin WebSockets, and a dedicated UI for group management.

Key Changes:

Data Layer:

  • Added SyncPlayRepository and JellyfinSyncPlayRepository to handle API interactions for group lifecycle and playback reporting.
  • Implemented SyncPlayRawWebSocket for low-level parsing of real-time group events and commands.
  • Created SyncPlayTimeSyncEngine to calculate clock offsets between the client and server for precise event scheduling.

UI Components:

  • SyncPlayGroupSheet: A new dialog for creating, joining, and viewing active watch party groups and members.
  • SyncPlayWaitingOverlay: Added a UI state to indicate when playback is paused waiting for other participants.
  • PlayerControls: Added a "Watch Party" toggle button and integrated it with the player UI.

Logic & Integration:

  • Introduced SyncPlayViewModel to manage watch party state and coordinate between the repository and the player.
  • Updated PlayerViewModel with a SyncPlayInterceptor pattern to allow SyncPlay to intercept and broadcast local playback events (play/pause/seek).
  • Integrated lifecycle observers in PlayerScreen to report buffering and readiness states when the app moves between foreground and background.

Infrastructure:

  • Updated JellyfinWebSocketManager to subscribe to SyncPlay-specific command and update messages.
  • Registered SyncPlayRepository in RepositoryModule for Hilt dependency injection.

MakD and others added 2 commits June 2, 2026 00:50
This commit introduces SyncPlay functionality, enabling users to create, join, and manage "Watch Parties" for synchronized playback. It includes a time synchronization engine to handle clock skew, real-time coordination via Jellyfin WebSockets, and a dedicated UI for group management.

### Key Changes:

*   **Data Layer**:
    *   Added `SyncPlayRepository` and `JellyfinSyncPlayRepository` to handle API interactions for group lifecycle and playback reporting.
    *   Implemented `SyncPlayRawWebSocket` for low-level parsing of real-time group events and commands.
    *   Created `SyncPlayTimeSyncEngine` to calculate clock offsets between the client and server for precise event scheduling.
*   **UI Components**:
    *   **`SyncPlayGroupSheet`**: A new dialog for creating, joining, and viewing active watch party groups and members.
    *   **`SyncPlayWaitingOverlay`**: Added a UI state to indicate when playback is paused waiting for other participants.
    *   **`PlayerControls`**: Added a "Watch Party" toggle button and integrated it with the player UI.
*   **Logic & Integration**:
    *   Introduced `SyncPlayViewModel` to manage watch party state and coordinate between the repository and the player.
    *   Updated `PlayerViewModel` with a `SyncPlayInterceptor` pattern to allow SyncPlay to intercept and broadcast local playback events (play/pause/seek).
    *   Integrated lifecycle observers in `PlayerScreen` to report buffering and readiness states when the app moves between foreground and background.
*   **Infrastructure**:
    *   Updated `JellyfinWebSocketManager` to subscribe to SyncPlay-specific command and update messages.
    *   Registered `SyncPlayRepository` in `RepositoryModule` for Hilt dependency injection.
Refactor Discord webhook action to use jq for secure data extraction from event JSON. Improved handling of empty descriptions and added debugging output for failed notifications.
@MakD MakD merged commit e12227c into master Jun 1, 2026
2 checks passed
@MakD MakD deleted the syncplay-support branch June 1, 2026 19:39
@MakD MakD mentioned this pull request Jun 2, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant