-
Notifications
You must be signed in to change notification settings - Fork 232
Youtube sync integration #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
farzanshibu
wants to merge
25
commits into
freeman-jiang:main
from
farzanshibu:youtube-sync-integration
Closed
Youtube sync integration #58
farzanshibu
wants to merge
25
commits into
freeman-jiang:main
from
farzanshibu:youtube-sync-integration
Conversation
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
- Updated Queue component to use `selectedAudioUrl` instead of `selectedAudioId` for better clarity and consistency. - Replaced `LocalAudioSource` with `AudioSourceType` to align with new data structure. - Enhanced audio duration retrieval using `getAudioDuration` method. - Removed unused TrackSelector and UploadHistory components to streamline the codebase. - Adjusted WebSocketManager to handle new audio source events and updated related types in the shared library. This refactor improves the overall structure and maintainability of the audio handling logic across the application.
- Eliminated the spatialConfig variable from the UserGrid component as it was no longer needed. - Updated the useEffect dependency array to reflect this change, improving performance and clarity. This cleanup enhances the component's efficiency by reducing unnecessary dependencies.
- Bump bun version from 1.2.2 to 1.2.18 - Update @aws-sdk/s3-request-presigner from 3.828.0 to 3.842.0 - Upgrade turbo from 2.4.4 to 2.5.4
- Added YouTubeSource interface to localTypes for managing YouTube video data. - Implemented youtube.ts to handle YouTube API interactions, including video search and details retrieval. - Enhanced global state management in global.ts to support YouTube sources, player readiness, and playback controls. - Updated websocketHandlers.ts to handle YouTube play, pause, and seek actions. - Introduced new WebSocket request and broadcast types for YouTube actions in WSRequest.ts and WSBroadcast.ts. - Added mock data for YouTube search results for development purposes. - Included necessary dependencies for YouTube integration in bun.lock.
- Introduced the `async-mutex` package to manage concurrent audio initialization in the global store. - Replaced the existing `initializeAudio` function with `initializeAudioExclusively`, ensuring that only one initialization process can run at a time. - Added logging to inform when initialization is skipped due to an ongoing process. This change enhances the stability of audio handling by preventing race conditions during initialization.
- Removed the legacy RoomManager implementation and replaced it with a new GlobalManager that handles all active rooms. - Introduced a new RoomManager class for individual room operations, encapsulating client and audio source management. - Updated all relevant routes and WebSocket handlers to utilize the GlobalManager for room access and manipulation. - Enhanced cleanup and stats routes to reflect the new room management structure. This refactor improves code organization and scalability by centralizing room management, making it easier to maintain and extend functionality in the future.
- Added build script to package.json for Bun. - Introduced new test scripts for S3 operations and cleanup. - Removed obsolete r2-test.ts file. - Implemented S3 configuration validation on startup in r2.ts. - Enhanced error handling and logging in S3 operations. - Added timeout for room cleanup operations in roomManager.ts. - Updated HTTP request types to remove unused default audio fetch response. - Created comprehensive Docker setup documentation. - Added Docker support for client and server with appropriate Dockerfiles and .dockerignore files. - Implemented automated MinIO bucket creation in docker-compose files. - Developed scripts for easy Docker setup and management.
- Added StateManager to handle state restoration and backup during server startup and shutdown. - Implemented graceful shutdown logic to manage server termination and state backup, preventing multiple shutdown executions. - Introduced methods for uploading and downloading JSON data to/from R2, enhancing data management capabilities. - Added functionality to retrieve the latest file with a given prefix and delete objects from R2. These changes improve server reliability and data persistence, ensuring a smoother shutdown process and better state management.
- Updated SIGINT handling to allow for a force exit on multiple Ctrl+C inputs, improving shutdown behavior. - Introduced Zod schemas for validating backup data structure in StateManager, ensuring data integrity during restoration. - Added tests for backup data validation to confirm schema compliance. These changes enhance server reliability during shutdown and improve data validation processes, ensuring a more robust state management system.
…Tube API key reference
… youtube-integration
…beatsync into youtube-integration
- Added audio system status management to global state, including readiness and playback synchronization. - Implemented pending playback sync and room state management for audio and YouTube selections. - Created tests for room state synchronization and YouTube source removal. - Updated RoomManager to handle selected audio and YouTube IDs, along with playback state. - Enhanced WebSocket handlers to broadcast selected audio, YouTube video, and playback state to newly joined clients. - Introduced new WebSocket message types for removing YouTube sources and playback state updates.
|
@farzanshibu is attempting to deploy a commit to the freemanjiang's projects Team on Vercel. A member of the Team first needs to authorize it. |
…ckerfile for client and server, and update docker-compose configuration for improved service management and environment variable handling.
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 pull request introduces significant updates to the BeatSync application, including a new Docker setup, enhanced client functionality, and support for YouTube integration. The most important changes include adding a comprehensive Docker setup guide, updating the client to support YouTube playback and library management, and improving the overall developer experience with updated dependencies and configurations.
Docker Setup and Documentation
DOCKER.mdfile outlining the setup process for local development and production, including MinIO configuration, environment variables, and troubleshooting steps.Dockerfilefor the client application to streamline containerized builds and deployments..dockerignorefile to exclude unnecessary files and directories from the Docker build context.YouTube Integration
Left,Main, andRightdashboard components to support a new YouTube mode, allowing users to search, queue, and play YouTube videos synchronized across devices. [1] [2] [3]next.config.tsfile to allow loading images from YouTube (i.ytimg.com) for better integration.Client Enhancements
Buttoncomponent in theQueueandLeftcomponents for better consistency and maintainability. [1] [2]Playercomponent with a newUnifiedPlayercomponent in theBottomdashboard section.Dependency Updates
package.jsonfile, including@radix-ui,axios,react, andnext, ensuring compatibility and access to the latest features.react-youtubeand@types/youtubeto support YouTube integration.Minor Improvements
Toastercomponent inlayout.tsxto userichColorsfor improved visuals.Queuecomponent to include theButtoncomponent and improve UI consistency.