A real-time music listening app.
Rhythm Room enables you to listen to music and watch videos with your friends synchronously. Create a room, invite some friends, and queue up a song from your favorite artist.
Rhythm Room was created in one week by Samantha Prestrelski and Jeremy Nguyen at SPIS UCSD 2021.
Sam is a Math-CS major at Warren College interested in design, web development, and machine learning. She focused on API, hosting, and backend.
Jeremy is a Math-CS major at Eleanor Roosevelt College interested in web development and cybersecurity. He mainly worked on front-end and syncing using websockets.
Service | Use |
---|---|
Express | Application framework |
React | User interface |
Node.js | Web server |
Heroku | Hosting platform |
Socket.io | Syncing audio/video across multiple clients, making rooms and generating unique links |
YouTube iFrame API | Embedding YouTube video and player controls |
youtube-search | Searching for songs |
- The
YouTube iFrame API
is used to create an embedded player, which has customizable player controls and parameters. youtube-search
is used to search for new songs, querying the user input and returning the video ID of the first search result.React
states are used to update the text fields once the URL and video ID have been found.- If a song is currently playing, newly queued songs are added to an array and played once the current video ends.
Socket.io
is used to enable real-time event-based communication between the browser and server, allowing users to make and join rooms. Room links are generating using the name of the user and the name of the room.Socket.io
is used to syncing audio and video across multiple clients.
Prequisites:
- A Heroku account and installed Heroku CLI tools
- A YouTube Data API v3 Key
- Node and NPM for package management
- Note: This project uses NPM for package management. If you use yarn, change the command in
package.json
toreact-scripts build && (cd server && yarn install)
- Note: This project uses NPM for package management. If you use yarn, change the command in
Setup:
- Clone this repository.
- In the root directory of the respository, run
heroku create
. - Run
git push heroku master
. - Run
heroku config:set REACT_YT_API_KEY=key
, but replacekey
with your own API key.
Projects that enable the YouTube Data API have a default quota allocation of 10,000 units per day, an amount sufficient for the majority of our API users. You can see your quota usage on the Quotas page in the API Console.
– YouTube Data API Documentation
Because of quota limits, the search function will not work if more than 100 videos are searched in one day. However, you can still play synced videos with the video URL. If you are self-hosting, generate a new API key and try again.
As Rhythm Room was created in one week, there are other features that could be added and potential bugs. Here is a list of future improvements that could be made
- Sync video pausing/elapsed time
- Show the videos currently in the queue
- Skip button
- Searchable public rooms
- Reactions such as thumbs-up, smile, laugh, etc.
- Add multiple songs from a playlist
- Chat
- Music visualizer