Shivam
commited on
Commit
·
05bfbda
1
Parent(s):
d092f57
Add README metadata for Hugging Face Space
Browse files
README.md
CHANGED
|
@@ -1,170 +1,12 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
#
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
## Supported formats
|
| 15 |
-
|
| 16 |
-
- YouTube videos
|
| 17 |
-
|
| 18 |
-
- Facebook videos
|
| 19 |
-
|
| 20 |
-
- SoundCloud tracks
|
| 21 |
-
|
| 22 |
-
- Streamable videos
|
| 23 |
-
|
| 24 |
-
- Vimeo videos
|
| 25 |
-
|
| 26 |
-
- Wistia videos
|
| 27 |
-
|
| 28 |
-
- Twitch videos
|
| 29 |
-
|
| 30 |
-
- DailyMotion videos
|
| 31 |
-
|
| 32 |
-
- Vidyard videos
|
| 33 |
-
|
| 34 |
-
- Kaltura videos
|
| 35 |
-
|
| 36 |
-
- Files playable via `<video>` or `<audio>` element as well as:
|
| 37 |
-
|
| 38 |
-
- HLS streams
|
| 39 |
-
- DASH streams
|
| 40 |
-
|
| 41 |
-
- Everything that is extractable via [yt-dlp](https://github.com/yt-dlp/yt-dlp) and allowed
|
| 42 |
-
via [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
|
| 43 |
-
|
| 44 |
-
## Known limitations
|
| 45 |
-
|
| 46 |
-
I would have loved to keep the original Player-UIs for ease of use, but they are usually being embedded as an iframe, as
|
| 47 |
-
such the software would be limited to the included API of the vendors. This is sadly not an option if you want to make
|
| 48 |
-
sure that everyone stays synchronised and there is no feedback loop of commands.
|
| 49 |
-
|
| 50 |
-
## Getting started
|
| 51 |
-
|
| 52 |
-
To run this software on your own hardware, you will need to have [Docker](https://www.docker.com/) or any other
|
| 53 |
-
container engine installed.
|
| 54 |
-
|
| 55 |
-
### docker-compose
|
| 56 |
-
|
| 57 |
-
For ease of use there is an
|
| 58 |
-
example [docker-compose.yml](https://github.com/Web-SyncPlay/Web-SyncPlay/docker-compose.yml) file provided, which you
|
| 59 |
-
can copy and adjust to fit your deployment.
|
| 60 |
-
|
| 61 |
-
Simply create a `.env` file in the same directory and run `docker-compose config` to see if the docker-compose file is
|
| 62 |
-
correctly configured.
|
| 63 |
-
|
| 64 |
-
### docker
|
| 65 |
-
|
| 66 |
-
Otherwise, you could simply run the images separately via the `docker` command:
|
| 67 |
-
|
| 68 |
-
To start the temporary in memory database [redis](https://redis.io):
|
| 69 |
-
|
| 70 |
-
```bash
|
| 71 |
-
docker run -d -p 6379:6379 redis
|
| 72 |
-
```
|
| 73 |
-
|
| 74 |
-
Now run the actual service via:
|
| 75 |
-
|
| 76 |
-
```bash
|
| 77 |
-
docker run -d -p 8081:8081 -e REDIS_URL=redis://your-ip:6379 websyncplay/websyncplay
|
| 78 |
-
```
|
| 79 |
-
|
| 80 |
-
### Manual setup
|
| 81 |
-
|
| 82 |
-
To get started with running the project directly via node, clone the repository via:
|
| 83 |
-
|
| 84 |
-
```bash
|
| 85 |
-
git clone https://github.com/Web-SyncPlay/Web-SyncPlay
|
| 86 |
-
```
|
| 87 |
-
|
| 88 |
-
When you are trying to develop on the project simply run
|
| 89 |
-
|
| 90 |
-
```bash
|
| 91 |
-
yarn dev
|
| 92 |
-
```
|
| 93 |
-
|
| 94 |
-
You can now view the project under `http://localhost:3000` with hot reloads
|
| 95 |
-
|
| 96 |
-
To run an optimized deployment you need to run the following two commands:
|
| 97 |
-
|
| 98 |
-
```bash
|
| 99 |
-
yarn build && yarn start
|
| 100 |
-
```
|
| 101 |
-
|
| 102 |
-
### Environment variables
|
| 103 |
-
|
| 104 |
-
| Parameter | Function | Default |
|
| 105 |
-
| --------------- | ---------------------------------------------- | ---------------------- |
|
| 106 |
-
| `SITE_NAME` | The name of your site | `"The Anime Index"` |
|
| 107 |
-
| `PUBLIC_DOMAIN` | Your domain or IP, remove trailing slash | `"https://piracy.moe"` |
|
| 108 |
-
| `REDIS_URL` | Connection string for the redis cache database | `"redis://redis:6379"` |
|
| 109 |
-
|
| 110 |
-
After deployment open your browser and visit http://localhost:8081 or however you address the server. It is
|
| 111 |
-
**_strongly_** recommended putting a reverse proxy using TLS/SSL in front of this service.
|
| 112 |
-
|
| 113 |
-
## Adding synchronised playback to your website
|
| 114 |
-
|
| 115 |
-
> **Warning**: currently not functional, if you want to keep using it use the v1.0 tag
|
| 116 |
-
|
| 117 |
-
A necessary prerequisite is to make your video files available to this service as e.g. HLS/DASH streams or as a simple
|
| 118 |
-
natively playable file via an endpoint publicly accessible via a URL. Make sure your CORS setting allow content to be
|
| 119 |
-
fetched from this service.
|
| 120 |
-
|
| 121 |
-
Having started the service on one of your servers you can then embed the included embed into your website. You don't
|
| 122 |
-
have to manually update the iframe when playing a playlist, as this is already handled automatically.
|
| 123 |
-
|
| 124 |
-
- `<YOUR_ENDPOINT>`: your endpoint from where this service will be accessible, e.g. `https://sync.example.com`
|
| 125 |
-
|
| 126 |
-
- `<ROOM_ID>`: the room ID in which participants will be kept in sync. It is recommended to handle the generation of new
|
| 127 |
-
ID-string on your side, you don't have to do anything on the server side here, the room will be auto created.
|
| 128 |
-
|
| 129 |
-
- `<YOUR_MEDIA_URL>`: publicly accessible media url, from which you serve your video/audio
|
| 130 |
-
|
| 131 |
-
For playing only a single file the service can be embedded via
|
| 132 |
-
|
| 133 |
-
```html
|
| 134 |
-
<iframe
|
| 135 |
-
allow="fullscreen; autoplay; encrypted-media; picture-in-picture"
|
| 136 |
-
style="border:none;"
|
| 137 |
-
width="100%"
|
| 138 |
-
height="100%"
|
| 139 |
-
src="<YOUR_ENDPOINT>/embed/player/<ROOM_ID>?url=<YOUR_MEDIA_URL>"
|
| 140 |
-
>
|
| 141 |
-
</iframe>
|
| 142 |
-
```
|
| 143 |
-
|
| 144 |
-
If you want to sync playback across a playlist, you need to adjust the embed
|
| 145 |
-
|
| 146 |
-
- `<START_INDEX>`: index of the `queue` array, indicates from which point playback should start
|
| 147 |
-
|
| 148 |
-
- `<ITEM_1>`, `<ITEM_2>` ... `<ITEM_N>`: playlist item, the same as `<YOUR_MEDIA_URL>`, they need to be passed in the
|
| 149 |
-
order you want them to be ordered
|
| 150 |
-
|
| 151 |
-
```html
|
| 152 |
-
<iframe
|
| 153 |
-
allow="fullscreen; autoplay; encrypted-media; picture-in-picture"
|
| 154 |
-
style="border:none;"
|
| 155 |
-
width="100%"
|
| 156 |
-
height="100%"
|
| 157 |
-
src="<YOUR_ENDPOINT>/embed/player/<ROOM_ID>?queueIndex=<START_INDEX>&queue=<ITEM_1>&queue=<ITEM_2>...&queue=<ITEM_N>"
|
| 158 |
-
>
|
| 159 |
-
</iframe>
|
| 160 |
-
```
|
| 161 |
-
|
| 162 |
-
You can already disable the player UI by adding `&controlsHidden=true` to the src link of the embed.
|
| 163 |
-
|
| 164 |
-
It is also possible to disable the syncing handler by adding `&showRootPlayer=true`. This is not recommended as this
|
| 165 |
-
will break the sync-process of the playback.
|
| 166 |
-
|
| 167 |
-
## Future developments
|
| 168 |
-
|
| 169 |
-
It is planned to create an api to communicate with the player and be able to use your own custom player to control
|
| 170 |
-
playback.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Streamer
|
| 3 |
+
emoji: 🎵
|
| 4 |
+
colorFrom: pink
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: docker # or gradio, streamlit, static
|
| 7 |
+
app_file: app.py
|
| 8 |
+
pinned: false
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Streamer
|
| 12 |
+
A synced video/music room app based on Web-SyncPlay.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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