mentioned owncast support in the readme
This commit is contained in:
@@ -4,13 +4,14 @@ StreamGoose (aka StreamGoOSE, Streamer's Go-based Open Source Enhancer) is an op
|
|||||||
|
|
||||||
As of now, most of the StreamGoose codebase is written in Go 1.23.1. The Web part is written in HTML5, CSS3 and JavaScript using the ES2015 standard.
|
As of now, most of the StreamGoose codebase is written in Go 1.23.1. The Web part is written in HTML5, CSS3 and JavaScript using the ES2015 standard.
|
||||||
|
|
||||||
|
|
||||||
## Current features
|
## Current features
|
||||||
|
|
||||||
The status of StreamGoose is currently **alpha**. Use at your own risk.
|
The status of StreamGoose is currently **alpha**. Use at your own risk.
|
||||||
|
|
||||||
Nevertheless, the following features are already implemented:
|
Nevertheless, the following features are already implemented:
|
||||||
|
|
||||||
- Twitch and YouTube chat aggregation (see "Backend implementation status" section)
|
- Twitch, YouTube and Owncast chat aggregation (see "Backend implementation status" section)
|
||||||
- Handling Twitch emotes
|
- Handling Twitch emotes
|
||||||
- Handling YouTube non-Unicode emotes (see "Backend implementation status" section)
|
- Handling YouTube non-Unicode emotes (see "Backend implementation status" section)
|
||||||
- Message styling based on Twitch and YouTube roles
|
- Message styling based on Twitch and YouTube roles
|
||||||
@@ -21,6 +22,7 @@ Nevertheless, the following features are already implemented:
|
|||||||
- Twitch system message support (needs more testing)
|
- Twitch system message support (needs more testing)
|
||||||
- [Noto Color Emoji](https://fonts.google.com/noto/specimen/Noto+Color+Emoji) font bundled for universal Unicode emoji support
|
- [Noto Color Emoji](https://fonts.google.com/noto/specimen/Noto+Color+Emoji) font bundled for universal Unicode emoji support
|
||||||
|
|
||||||
|
|
||||||
## Planned features
|
## Planned features
|
||||||
|
|
||||||
- Moving to OAuth 2.0 for YouTube
|
- Moving to OAuth 2.0 for YouTube
|
||||||
@@ -31,6 +33,7 @@ Nevertheless, the following features are already implemented:
|
|||||||
- Starting window geometry customization via config (now doable via custom JS)
|
- Starting window geometry customization via config (now doable via custom JS)
|
||||||
- ...
|
- ...
|
||||||
|
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
StreamGoose consists of three components: a set of backends, a message broker server and a Web-based frontend.
|
StreamGoose consists of three components: a set of backends, a message broker server and a Web-based frontend.
|
||||||
@@ -74,7 +77,7 @@ An **external** StreamGoose backend is a program (written in any network-enabled
|
|||||||
|
|
||||||
Whenever a new JSON message is shaped with the fields above, it shall be sent to the broker at the `/new` endpoint with the HTTP POST method. A `{"status":1}` response will be sent back if the request is successful.
|
Whenever a new JSON message is shaped with the fields above, it shall be sent to the broker at the `/new` endpoint with the HTTP POST method. A `{"status":1}` response will be sent back if the request is successful.
|
||||||
|
|
||||||
As of now, StreamGoose provides two reference backends: for Twitch and for YouTube, both internal and written in Go. See "Backend implementation status" section for current notes and caveats.
|
As of now, StreamGoose provides three reference backends: for Twitch, for YouTube and for Owncast, all of them internal and written in Go. See "Backend implementation status" section for current notes and caveats.
|
||||||
|
|
||||||
### Frontend
|
### Frontend
|
||||||
|
|
||||||
@@ -115,6 +118,7 @@ Then rerun the command from step 2.
|
|||||||
|
|
||||||
**Note**: When testing the cross-compiled build under Wine, you must have Microsoft Edge WebView2 Runtime installed in order for the GUI to work at all. You can [download](https://developer.microsoft.com/en-us/microsoft-edge/webview2) this engine directly from the Microsoft website (select "Evergreen Standalone Installer") and install it into your Wine profile. Be sure to enable at least Windows 7 emulation in winecfg.
|
**Note**: When testing the cross-compiled build under Wine, you must have Microsoft Edge WebView2 Runtime installed in order for the GUI to work at all. You can [download](https://developer.microsoft.com/en-us/microsoft-edge/webview2) this engine directly from the Microsoft website (select "Evergreen Standalone Installer") and install it into your Wine profile. Be sure to enable at least Windows 7 emulation in winecfg.
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Enter the distribution directory and run the `./streamgoose` or `streamgoose.exe` binary. It should run with the default `config.json` file, start the server, spawn the internal backends and open the UI window. Alternatively, you can pass another JSON file as the first command line parameter.
|
Enter the distribution directory and run the `./streamgoose` or `streamgoose.exe` binary. It should run with the default `config.json` file, start the server, spawn the internal backends and open the UI window. Alternatively, you can pass another JSON file as the first command line parameter.
|
||||||
@@ -143,6 +147,12 @@ The following fields in the `config.json` are specific to the YouTube internal b
|
|||||||
- `yt_channel`: the YouTube channel that you want to receive messages from (needs to start with `@`). If only this field is specified and the channel has several live broadcasts running, the backend will fetch the first broadcast from the list.
|
- `yt_channel`: the YouTube channel that you want to receive messages from (needs to start with `@`). If only this field is specified and the channel has several live broadcasts running, the backend will fetch the first broadcast from the list.
|
||||||
- `yt_video_id`: an optional field that allows you to pass a particular broadcast video ID to get the live chat messages from. Overrides the `yt_channel` field.
|
- `yt_video_id`: an optional field that allows you to pass a particular broadcast video ID to get the live chat messages from. Overrides the `yt_channel` field.
|
||||||
|
|
||||||
|
The following fields in the `config.json` are specific to the Owncast internal backend:
|
||||||
|
|
||||||
|
- `oc_backend_enabled`: whether or not the Owncast internal backend is turned on.
|
||||||
|
- `oc_server`: your Owncast server root URL.
|
||||||
|
- `oc_api_poll_timeout`: the interval (in seconds) to poll the Owncast chat with. Recommended to set to at least 2 seconds.
|
||||||
|
|
||||||
Example `config.json` file:
|
Example `config.json` file:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@@ -156,7 +166,10 @@ Example `config.json` file:
|
|||||||
"yt_backend_enabled": true,
|
"yt_backend_enabled": true,
|
||||||
"yt_api_root_url": "https://yt.lemnoslife.com/noKey",
|
"yt_api_root_url": "https://yt.lemnoslife.com/noKey",
|
||||||
"yt_api_poll_timeout": 3,
|
"yt_api_poll_timeout": 3,
|
||||||
"yt_channel": "@foxyshadow"
|
"yt_channel": "@foxyshadow",
|
||||||
|
"oc_backend_enabled": true,
|
||||||
|
"oc_server": "https://streams.luxferre.top",
|
||||||
|
"oc_api_poll_timeout": 2
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -174,6 +187,17 @@ The following procedure needs to be only done once:
|
|||||||
|
|
||||||
As of now, nothing needs to be done except setting the `yt_backend_enabled` field to `true` in `config.json`, but this section will change soon once the backend moves to OAuth 2.0.
|
As of now, nothing needs to be done except setting the `yt_backend_enabled` field to `true` in `config.json`, but this section will change soon once the backend moves to OAuth 2.0.
|
||||||
|
|
||||||
|
### Connecting Owncast internal backend
|
||||||
|
|
||||||
|
The following procedure needs to be only done once:
|
||||||
|
|
||||||
|
1. Go to the admin panel of your Owncast server. Open the "Integrations" - "Access tokens" menu item.
|
||||||
|
2. Create a new access token with the "Can perform administrative actions such as moderation, get server statuses, etc" permission.
|
||||||
|
3. Copy the token string generated in the admin panel and paste it into the `oc-token.txt` file in the `auth` subdirectory in the application directory.
|
||||||
|
4. Save the file. The Owncast connection should now work and fetch messages whenever you start a livestream.
|
||||||
|
5. If the connection doesn't work, make sure that the `oc_backend_enabled` field is set to `true` in `config.json` and you didn't revoke the token in the admin panel.
|
||||||
|
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
Being a Web-based application, the StreamGoose frontend provides vast customization capabilities on both the layout and client-side logic sides.
|
Being a Web-based application, the StreamGoose frontend provides vast customization capabilities on both the layout and client-side logic sides.
|
||||||
@@ -189,11 +213,14 @@ The `webroot/style.css` is the main point of customization. Here is a short (and
|
|||||||
- `.timestamp`: message timestamp (hidden by default)
|
- `.timestamp`: message timestamp (hidden by default)
|
||||||
- `.tw`: a Twitch message (applies to the whole message block, as well as **all the subsequent classes** listed here)
|
- `.tw`: a Twitch message (applies to the whole message block, as well as **all the subsequent classes** listed here)
|
||||||
- `.yt`: a YouTube message
|
- `.yt`: a YouTube message
|
||||||
|
- `.oc`: an Owncast message
|
||||||
- `.me`: third-party action
|
- `.me`: third-party action
|
||||||
- `.broadcaster`: a message that comes from the Twitch/YouTube channel owner
|
- `.broadcaster`: a message that comes from the Twitch/YouTube channel owner
|
||||||
- `.moderator`: a message that comes from a Twitch/YouTube chat moderator
|
- `.moderator`: a message that comes from a Twitch/YouTube chat moderator
|
||||||
- `.sponsor`: a message that comes from a YouTube chat sponsor
|
- `.sponsor`: a message that comes from a YouTube chat sponsor
|
||||||
- `.verified`: a message that comes from a YouTube verified account
|
- `.verified`: a message that comes from a YouTube verified account
|
||||||
|
- `.authenticated`: a message that comes from an Owncast authenticated user
|
||||||
|
- `.bot`: a message that comes from an Owncast bot
|
||||||
|
|
||||||
Additionally, every Twitch badge is converted into a CSS class that can be applied to a message block, e.g.
|
Additionally, every Twitch badge is converted into a CSS class that can be applied to a message block, e.g.
|
||||||
|
|
||||||
@@ -219,6 +246,7 @@ var messageHighlightRules = {
|
|||||||
|
|
||||||
Each regular expression captures: the string start or a whitespace character, then one of the nickname alternatives, then either a comma, a semicolon, a colon or another whitespace character or the end of the string. If the message text matches the first expression, it is colored in red, if it matches the second one, it is colored in orange, if it matches the third one, it is colored in blue.
|
Each regular expression captures: the string start or a whitespace character, then one of the nickname alternatives, then either a comma, a semicolon, a colon or another whitespace character or the end of the string. If the message text matches the first expression, it is colored in red, if it matches the second one, it is colored in orange, if it matches the third one, it is colored in blue.
|
||||||
|
|
||||||
|
|
||||||
## Backend implementation status
|
## Backend implementation status
|
||||||
|
|
||||||
### Twitch (internal)
|
### Twitch (internal)
|
||||||
@@ -235,6 +263,11 @@ Rewriting the backend to support OAuth is one of the highest priorities.
|
|||||||
|
|
||||||
Additionally, YouTube does not have its own chat emote API as of now, so the emote set is hardcoded in the `/webroot/img` directory and can become outdated over time.
|
Additionally, YouTube does not have its own chat emote API as of now, so the emote set is hardcoded in the `/webroot/img` directory and can become outdated over time.
|
||||||
|
|
||||||
|
### Owncast (internal)
|
||||||
|
|
||||||
|
Work in progress.
|
||||||
|
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
### What were the reasons for starting this project?
|
### What were the reasons for starting this project?
|
||||||
@@ -259,9 +292,9 @@ Everyone is free to send their suggestions and patches. Once you get a Codeberg
|
|||||||
|
|
||||||
Yes, due to the way Go links its networking client and server code and everything else statically (where possible). On Linux, you may try using GCC Go instead to achieve fully dynamic linking. Keep in mind that GCC Go is not fully supported yet, and if you come to our issue tracker with an issue that's only reproducible with GCC Go, it's less likely to be resolved.
|
Yes, due to the way Go links its networking client and server code and everything else statically (where possible). On Linux, you may try using GCC Go instead to achieve fully dynamic linking. Keep in mind that GCC Go is not fully supported yet, and if you come to our issue tracker with an issue that's only reproducible with GCC Go, it's less likely to be resolved.
|
||||||
|
|
||||||
### Beyond Twitch and YouTube, are there any other livestreaming platforms that you plan to support internally?
|
### Beyond Twitch, YouTube and Owncast, are there any other livestreaming platforms that you plan to support internally?
|
||||||
|
|
||||||
Sure! For instance, one of the next close targets will be [Owncast](https://owncast.online/) self-hosted livestreaming solution and its rather simple chat API. The problem with adding a new platform support, as always, is finding enough time to study the API and enough people that would find this support valuable. For example, with enough demand, Kick and Trovo support are also likely to be added.
|
Sure, anything can happen. The problem with adding a new platform support, as always, is finding enough time to study the API and enough people that would find this support valuable. For example, with enough demand, Kick and Trovo support are also likely to be added.
|
||||||
|
|
||||||
Besides Twitch, YouTube and Owncast, however, your best bet would be to create an **external** backend for the platform you're interested in, and then incorporate it into this repo in the `/external` directory. When the backend is mature enough, we can always sit and think about how to convert it into an internal one to be distributed inside the StreamGoose binary.
|
Besides Twitch, YouTube and Owncast, however, your best bet would be to create an **external** backend for the platform you're interested in, and then incorporate it into this repo in the `/external` directory. When the backend is mature enough, we can always sit and think about how to convert it into an internal one to be distributed inside the StreamGoose binary.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@ func oc_process_message(rawmsg map[string]interface{}) {
|
|||||||
|
|
||||||
/* check for authenticated role */
|
/* check for authenticated role */
|
||||||
if _, ok := author["authenticated"]; ok && author["authenticated"].(bool) == true {
|
if _, ok := author["authenticated"]; ok && author["authenticated"].(bool) == true {
|
||||||
out_message.Type += "-verified"
|
out_message.Type += "-authenticated"
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check for bot role */
|
/* check for bot role */
|
||||||
|
|||||||
Reference in New Issue
Block a user