master <- develop #7
|
@ -92,7 +92,7 @@ chat:
|
|||
jid: 'exampleBot@example.com'
|
||||
password: 'abcde'
|
||||
# connection settings for the bot
|
||||
nickname: 'SatyrChat
|
||||
nickname: 'SatyrChat'
|
||||
# the nickname the bot will join MUCs with
|
||||
|
||||
# note that for the best experience you should set the default number of history messages to 0 for the MUC
|
||||
|
|
|
@ -33,8 +33,7 @@ Then start the server.
|
|||
npm run start
|
||||
```
|
||||
|
||||
It is reccomended that you run Satyr behind a TLS terminating reverse proxy like nginx. An example configuration can be found in CONFIGURATION.md
|
||||
An example systemd service is provided at install/satyr.service. It assumes you've installed satyr into /opt/satyr, and created a satyr user with the home directory /var/lib/satyr for the purpose of running the service.
|
||||
It is reccomended that you run Satyr behind a TLS terminating reverse proxy like nginx. An example configuration can be found at install/satyr.nginx. An example systemd service is provided at install/satyr.service. It assumes you've installed satyr into /opt/satyr, and created a satyr user with the home directory /var/lib/satyr for the purpose of running the service.
|
||||
|
||||
## Updating Satyr
|
||||
Updating should be as simple as pulling the latest code and dependencies, then restarting the server.
|
||||
|
|
28
docs/REST.md
28
docs/REST.md
|
@ -26,7 +26,7 @@ Configuration of the instance relating to media
|
|||
|
||||
**Parameters**: none
|
||||
|
||||
**Response**: JSON object containing the port and ping_timeout for RTMP, public and private play endpoints, and whether adaptive livestreaming and VOD recording are enabled.
|
||||
**Response**: JSON object containing the port and ping_timeout for RTMP, whether clustering is enabled, public and private play endpoints, and whether adaptive livestreaming and VOD recording are enabled.
|
||||
|
||||
**Example**:
|
||||
```
|
||||
|
@ -69,7 +69,7 @@ sort is the optional way to sort results. current options are "alphabet" and "al
|
|||
|
||||
page is the page number (i.e. skip the first num * page results)
|
||||
|
||||
**Response**: Returns an array of JSON objects containing the username and title of each stream. Returns an empty array if no one is streaming. Returns `{"error":"error code"}` in the event of an error. Will attempt to correct malformed requests to default values.
|
||||
**Response**: Returns an array of JSON objects containing the username and title of each stream. Returns an empty array if no one is streaming. Returns `{"error":"error reason"}` in the event of an error. Will attempt to correct malformed requests to default values.
|
||||
|
||||
The array will be wrapped in a JSON object under the key 'users'.
|
||||
|
||||
|
@ -78,7 +78,7 @@ The array will be wrapped in a JSON object under the key 'users'.
|
|||
|
||||
## /api/users/all
|
||||
|
||||
Same as above, but returns all users regardless of whether they are streaming and if they're streaming or not.
|
||||
Same as above, but returns all users regardless of whether they are streaming and if they're streaming or not. Also returns a value 'live' indicating whether a user is currently streaming.
|
||||
|
||||
**Example**: `{users: [{username:"foo", title:"bar", live:1}] }`
|
||||
|
||||
|
@ -131,7 +131,7 @@ Update the current user's information
|
|||
|
||||
Rec is a boolean (whether to record VODs), twitch is a boolean (whether to mirror video streams to twitch) others are strings. Twitch_key is the stream key to use for twitch. Parameters that are not included in the request will not be updated.
|
||||
|
||||
**Response**: Returns `{error: "error code"}` or `{success: ""}`
|
||||
**Response**: Returns `{error: "error reason"}` or `{success: ""}`
|
||||
|
||||
|
||||
|
||||
|
@ -145,9 +145,9 @@ Update the chatrooms on other platforms to integrate with the user's stream chat
|
|||
|
||||
**Parameters**: discord, xmpp, twitch irc
|
||||
|
||||
Strings corresponding to a channel name to mirror to. XMPP is currently unused. Parameters not included in the request will not be updated.
|
||||
Strings corresponding to a channel name to mirror to. Parameters not included in the request will not be updated.
|
||||
|
||||
**Response**: Returns `{error: "error code"}` or `{success: ""}`
|
||||
**Response**: Returns `{error: "error reason"}` or `{success: ""}`
|
||||
|
||||
|
||||
|
||||
|
@ -159,9 +159,9 @@ Delete the specified vods of the current user
|
|||
|
||||
**Authentication**: yes
|
||||
|
||||
**Paramters**: A string array of the names of vods to be deleted. (Do not include the file extension);
|
||||
**Paramters**: A string array of the names of vods to be deleted. (Do not include the file extension)
|
||||
|
||||
**Response**: Returns `{error: "error code"}` or `{success: ""}`
|
||||
**Response**: Returns `{error: "error reason"}` or `{success: ""}`
|
||||
|
||||
## /api/user/password
|
||||
|
||||
|
@ -173,7 +173,7 @@ Change the current user's password
|
|||
|
||||
**Parameters**: The user's current password, the new password, AND a valid JWT cookie.
|
||||
|
||||
**Response**: Returns `{error: "error code"}` or `{success: ""}`
|
||||
**Response**: Returns `{error: "error reason"}` or `{success: ""}`
|
||||
|
||||
|
||||
|
||||
|
@ -187,7 +187,7 @@ Change the current user's stream key. This will not affect the stream if the use
|
|||
|
||||
**Parameters**: A valid JWT cookie. No other parameters.
|
||||
|
||||
**Response**: Returns `{error: "error code"}` or `{success: "new_stream_key"}`
|
||||
**Response**: Returns `{error: "error reason"}` or `{success: "new_stream_key"}`
|
||||
|
||||
|
||||
|
||||
|
@ -203,7 +203,7 @@ Get a list of the named users VODs
|
|||
|
||||
**Response**: Returns an array of VODs inside a JSON object with the format `{"vods": [{"name":"yote.mp4"},{"name":"yeet.mp4"}] }`
|
||||
|
||||
**Notes**: VODs are always available at http://domain.com/publicEndpoint/username/filename.mp4
|
||||
**Notes**: VODs are always available at http://domain/publicEndpoint/username/filename
|
||||
|
||||
|
||||
|
||||
|
@ -217,9 +217,9 @@ Get information about the specified user.
|
|||
|
||||
**Parameters**: user
|
||||
|
||||
**Response**: Returns a JSON object with available information about the user. If the user is authenticated and searching for their own information, will return all available information. Otherwise it will return only the stream title and bio. In the case of searching for a user that does not exist, the returned object will contain only the username searched for.
|
||||
**Response**: Returns a JSON object with available information about the user. If the user is authenticated and searching for their own information, will return all available information. Otherwise it will return only the stream title, bio, and whether the stream is live. In the case of searching for a user that does not exist, the returned object will contain only the username searched for.
|
||||
|
||||
**Example**: `{username: "foo", title: "bar", about: "This is an example bio"}`
|
||||
**Example**: `{username: "foo", title: "bar", about: "This is an example bio", live: 0}`
|
||||
|
||||
|
||||
|
||||
|
@ -235,4 +235,4 @@ Returns the current stream key for the authenticated user.
|
|||
|
||||
**Response**: returns a JSON object with the stream key
|
||||
|
||||
**Example**: `{"stream_key": "abcdefghijklmno12345"}` or `{"error":"error reason"}`
|
||||
**Example**: `{stream_key: "abcdefghijklmno12345"}` or `{error:"error reason"}`
|
|
@ -18,8 +18,7 @@ It's not very complex. The following commands are available:
|
|||
### Users
|
||||
|
||||
#### Accounts
|
||||
If registration is open, users can register at example.tld/registration, and set some options such as whether to record VODs and a stream title on /profile
|
||||
Stream keys can be changed at example.tld/changesk, and passwords at /changepwd
|
||||
If registration is open, users can register at your.site.com/registration, and set some options such as whether to record VODs and a stream title on /profile.
|
||||
|
||||
#### Chat
|
||||
Chat is based on Socket.IO, and can be accessed through the webclient at /chat.
|
||||
|
|
|
@ -69,4 +69,4 @@ twitch_mirror:
|
|||
enabled: false
|
||||
# https://stream.twitch.tv/ingests/
|
||||
# do not include {stream_key}
|
||||
ingest: 'rtmp://live-ord02.twitch.tv/app/
|
||||
ingest: 'rtmp://live-ord02.twitch.tv/app/'
|
|
@ -18,6 +18,10 @@ server {
|
|||
}
|
||||
|
||||
location ~* \.(mpd|m4s|mp4)$ {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
||||
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
|
||||
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
|
||||
# nginx can serve static files faster than node
|
||||
# this should improve performance
|
||||
root /opt/satyr/site/;
|
||||
|
|
|
@ -4,6 +4,6 @@ import { config } from "./config";
|
|||
|
||||
async function run() {
|
||||
await initDB();
|
||||
await clean(false);
|
||||
await clean();
|
||||
}
|
||||
run().then(() => {process.exit()});
|
||||
run().then(() => {process.exit()});
|
||||
|
|
|
@ -52,8 +52,8 @@
|
|||
<div>
|
||||
<div>
|
||||
<b>Satyr</b></br>
|
||||
<a href="https://gitlab.com/knotteye/satyr">About</a></br>
|
||||
<a href="https://gitlab.com/knotteye/satyr/-/releases">v{{ version }}</a>
|
||||
<a href="https://pond.waldn.net/git/knotteye/satyr">About</a></br>
|
||||
<a href="https://pond.waldn.net/git/knotteye/satyr/releases">v{{ version }}</a>
|
||||
</div>
|
||||
<div>
|
||||
<img src="/logo.svg" height="50" />
|
||||
|
|
Reference in New Issue