https://github.com/jivan052/angsnyc
https://github.com/jivan052/angsnyc
express html tailwind webapp websocket
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jivan052/angsnyc
- Owner: Jivan052
- License: apache-2.0
- Created: 2025-02-16T13:50:42.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-11-29T15:53:56.000Z (7 months ago)
- Last Synced: 2025-12-01T00:25:46.691Z (7 months ago)
- Topics: express, html, tailwind, webapp, websocket
- Language: HTML
- Homepage:
- Size: 916 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π¬ AngSync Room
A real-time YouTube video synchronization app that allows multiple users to watch the same video together and enjoy the real sync.


## π Features
β
Create or join a sync room with a unique **Room ID**.
β
Watch YouTube videos **in sync** with others.
β
**Play, pause, and seek** functionality is synchronized across all users in the room.
β
Change the **video URL dynamically**.
## π οΈ Technologies Used
- **Frontend**: HTML, JavaScript, TailwindCSS π¨
- **Backend**: Node.js, Express.js π₯οΈ
- **WebSockets**: For real-time video synchronization π
- **YouTube IFrame API**: For embedding and controlling YouTube videos π₯
## βοΈ Installation & Setup
### π Prerequisites
- Install [Node.js](https://nodejs.org/)
### π Steps
1. Clone the repository:
```sh
git clone https://github.com/your-repo/angsync-room.git
```
2. Install dependencies:
```sh
npm install
```
3. Start the server:
```sh
node server.js
```
4. Open `http://localhost:8080/` in your browser. π
## π οΈ How It Works
### **Server-side (server.js) π₯οΈ**
- Uses **Express.js** to serve the `index.html` file.
- Uses **WebSockets** to establish real-time communication between users.
- Manages rooms and keeps track of video state (**play, pause, seek, and URL changes**).
### **Client-side (index.html & JavaScript) π**
- Connects to the **WebSocket** server.
- Loads and controls the **YouTube video** using the **YouTube IFrame API**.
- Sends and receives **synchronization messages** (play, pause, seek, change URL) through **WebSockets**.
## π WebSocket Events
| π― Event Type | π Sent By | π Purpose |
|-------------|---------|---------|
| `join` | Client | User joins a room π₯ |
| `sync` | Server | Sends current video state to new users π |
| `play` | Client | Notifies all users to **play** video βΆοΈ |
| `pause` | Client | Notifies all users to **pause** video βΈοΈ |
| `seek` | Client | Synchronizes video position β© |
| `changeUrl` | Client | Updates video URL for all users π |
## π§ Issues & Improvements
π¨ **Sometimes pause/play actions donβt sync correctly.** Possible improvement: Implement a **timestamp-based synchronization mechanism**.
β‘ **Enhance error handling** for WebSocket disconnections.
π¨ **UI/UX improvements** for a better user experience.
## π License
π MIT License
## π€ Author
π **Jivan Jamdar** π