Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mateusaquino/watchparty

▶️ Start a Stremio session with friends: watch party, chat (soon) and share controls!
https://github.com/mateusaquino/watchparty

betterstremio plugin stremio

Last synced: 4 days ago
JSON representation

▶️ Start a Stremio session with friends: watch party, chat (soon) and share controls!

Awesome Lists containing this project

README

        



▶️ WatchParty is a BetterStremio session sharing plugin.











## 🎉 WatchParty



Archer Logo

**WatchParty** is the first BetterStremio plugin ever made. It was developed to connect multiple Stremio sessions at once. You can use it to start a Stremio session with friends: create and join watch party, chat (soon) and share controls. No addon sharing required.

This Plugin works by intercepting events on the Stremio HTML5 Player and sharing to everyone in the party through a websocket connection. Currently there are three available servers to connect from: [Glitch](https://dramatic-hazel-epoch.glitch.me), [Adaptable](https://watch-party.adaptable.app) (temp disabled) and [Render](https://watchparty-kyiy.onrender.com).

This repository is currently accepting contributions and suggestions, feel free to do so :)

Note: `msg:` packet was not yet implemented in WatchParty's plugin.

## 🌐 WatchParty Server

WatchParty is meant to be open for the public, but if you need to work on something locally you can also setup your own server.

### Local server

You can Setup a local server by running:

```bash
git clone https://github.com/MateusAquino/WatchParty
npm i
npm start
```

A WatchParty server instance will be up at `localhost:3000`.
You may also change the env variables if needed: `PORT` and `SERVER_PREFIX` (single letter, defaults to `L`).

### Server Connection

Connection protocol params must be separated by `#` and encoded (`encodeURIComponent`):

#### Create Party

- protocol: `c`
- `param[1]`: WatchParty protocol version
- `param[2]`: Username (string)
- `param[3]`: Party Password (string)
- `param[4]`: Party Name (string)
- `param[5]`: Join as Host? (1/0)

Usage example: `c#1#John#123#Example%20Party#1`

#### Join Party

- protocol: `j`
- `param[1]`: WatchParty protocol version
- `param[2]`: Username (string)
- `param[3]`: Party Code (string)
- `param[4]`: Party Password (string)

Usage example: `c#1#Jane#LJ7HLC#123`

### Packets

#### Server Packets

```elixir
upgrade -> Sent if protocol version mismatch
party: -> Returns a JSON party whenever there is a host/clients update
msg:: -> Returns the user id and the message broadcasted to the party
cmd:: -> Returns a JSON command used by WatchParty to sync actions and the sum of latencies from one client to another (example `cmd:130:go:["player", {...}]`)
badroom -> Sent if room code/password is wrong
ping -> Awaits for pong message (30s timeout)
```

Note: party packet returns the generated code, the first letter should be unique for each server (or "L" for local)

#### Client Packets

```elixir
msg: -> Broadcasts message to party
toggle: -> Toggles user host privileges (must be a host & > 1 host in the party)
cmd: -> Broadcasts JSON command to party (must be a host)
pong -> Ping response
```