Skip to content

Conversation

@spidervirus
Copy link

Summary

This PR introduces Apple Music integration to BeatSync, allowing users to connect their Apple Music accounts, search for tracks, and play them in real-time sync with other users in a room. Playback actions (play, pause, track selection) are synchronized across all participants using the existing WebSocket infrastructure.


Features

  • Apple Music Authentication:
    Users can connect their Apple Music accounts via MusicKit JS and sign in securely.

  • Track Search & Selection:
    Users can search for songs, artists, or albums from the Apple Music catalog and select tracks to play.

  • Synchronized Playback:
    When a user plays, pauses, or seeks an Apple Music track, the action is broadcast to all users in the room, ensuring everyone hears the same track at the same time.

  • UI Enhancements:

    • “Connect to Apple Music” button in the audio uploader.
    • Modal for Apple Music login and track search.
    • Player UI displays Apple Music track info and controls.
  • Protocol & Type Updates:

    • WebSocket protocol extended to support Apple Music sync messages.
    • Shared types updated for new fields (track ID, position, sourceType).

How to Test

  1. Start the app and join a room in two or more browser windows.
  2. Connect to Apple Music in each window.
  3. Search and select a track in one window.
  4. Play or pause the track—other windows should sync playback and track selection.
  5. All users must have an active Apple Music subscription and be signed in.

Notes

  • This feature requires a valid Apple Music developer token set in the .env file as NEXT_PUBLIC_APPLE_MUSIC_DEVELOPER_TOKEN.
  • All users must be Apple Music subscribers and signed in for playback to work.
  • File-based and Apple Music-based playback are handled distinctly in the sync protocol.

Checklist

  • Apple Music authentication and search
  • Real-time sync of playback actions
  • UI integration and feedback
  • Protocol and type updates
  • Manual multi-user testing

@vercel
Copy link

vercel bot commented Jul 16, 2025

@spidervirus is attempting to deploy a commit to the freemanjiang's projects Team on Vercel.

A member of the Team first needs to authorize it.

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