An open API service indexing awesome lists of open source software.

https://github.com/prashantrahul141/playinsync-server

Server code for PlayInSync.
https://github.com/prashantrahul141/playinsync-server

express nodejs typescript web-sockets

Last synced: 10 months ago
JSON representation

Server code for PlayInSync.

Awesome Lists containing this project

README

          

###

Play offline videos in Sync across the internet.

# Server Code for PlayInSync

This contains the server code for PlayInSync written in TypeScript using Express and Socket.io, Any changes made on the client (videoplayback) will be sent to the server and synced with all other clients.

### How?

Everytime someone changes the state of video playback (play/pause, seek, playback speed) the client sends that information to the server, and the server stores them, when all other clients connected to the same server request for changes the server sends those updates it stored previously and the clients update their playback state according to the data recieved.

### Why?

Since all clients have the video required to sync even before the sync starts, this removes the hassel of streaming video (which leads to loss in quality and drop in fps)

For client see - https://github.com/prashantrahul141/PlayInSync-Client

# 🛠️ Installation & Set Up

##### 1. Clone the repo

```sh
git clone https://github.com/prashantrahul141/PlayInSync-Client
```

##### 2. Install packages

```sh
npm i
```

##### 3. Run index.js using node

```sh
npm start
```

##### 4. Expose it to the Internet.

By default the app will listen to port 3000 and localhost, expose that to the internet to be able to use it from anywhere.

# 💻 Technologies used

- TypeScript
- Express
- Socket.io