Add Syncplay support#147
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
UI Components:
Logic & Integration:
Infrastructure: