commit b6f6dca9f92ddcc4c6256b3eb81c2eb4430d94a0
parent fa2e089e6c5645d770cb91a284aa6df2db8d09f9
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sat, 27 Apr 2024 16:50:55 +0200
Use plain text description
Diffstat:
A | README | | | 87 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
D | README.md | | | 71 | ----------------------------------------------------------------------- |
2 files changed, 87 insertions(+), 71 deletions(-)
diff --git a/README b/README
@@ -0,0 +1,87 @@
+tw2html
+-----
+
+Please send patches or remarks to <jayvii[AT]posteo[DOT]de>
+
+Checks online status of streams on twitch.tv and lets you watch them right here!
+
+Usage
+-----
+
+You can simply call the `?streams` endpoint with a comma-separated list of your
+favorite streams:
+
+index.php?streams=gamingonlinux,linustechtips,...
+
+Assuming you host this service under the URL "https://tw2html.example.com", you
+can open up the streamlist like so:
+
+https://tw2html.example.com/?streams=gamingonlinux,linustechtips
+
+The site will show you a loading screen, while the status of streams are fetched
+in the background. Once the process is finished, the site refreshes by itself
+and shows you a list of online streams. You can watch them directly on tw2html
+via iframe-embedding (this transfers your IP and user-agent information to
+twitch.tv).
+
+Alternatively if your client can handle `streamlink://` schemes, you may open
+the stream via https://streamlink.github.io/.
+
+Requirements
+-----
+
+- PHP-7.2 or higher
+
+Further notes
+-----
+
+streamlink:// scheme handler
+
+tw2html offers buttons with the custom `streamlink://` scheme. It gives you the
+opportunity to open up streams on your computer via streamlink.
+
+For Mozilla Firefox:
+
+Add following key in `about:config`:
+
+- Key: network.protocol-handler.expose.streamlink
+- Type: Boolean
+- Value: true
+
+For GNU/Linux:
+
+In addition to the scheme handler in your browser (see above for Firefox), you
+need to add a streamlink-handler (e.g. in `~/.local/bin/streamlink-handler.sh`),
+such as:
+
+
+#!/usr/bin/env bash
+
+function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
+
+URL=$(urldecode "$1" | sed -E -e 's/\?.*$//' -e 's/^streamlink/https/')
+TITLE=$(urldecode "$1" | sed -E -e 's/^.*?title=//')
+
+streamlink \
+ --player "mpv" \
+ --title "${TITLE}" \
+ "${URL}" best
+
+
+and the according `.desktop` file (e.g. in
+`~/.local/share/applications/streamlink-handler.desktop`):
+
+
+[Desktop Entry]
+Type=Application
+Name=Streamlink Scheme Handler
+Exec=.local/bin/streamlink-handler.sh %u
+StartupNotify=false
+NoDisplay=true
+MimeType=x-scheme-handler/streamlink;
+
+
+Afterwards, add the new scheme handler to xdg:
+
+
+xdg-mime default streamlink-handler.desktop x-scheme-handler/streamlink
diff --git a/README.md b/README.md
@@ -1,71 +0,0 @@
-# tw2html
-
-Checks online status of streams on twitch.tv and lets you watch them right here!
-
-
-## Usage:
-
-You can simply call the `?streams` endpoint with a comma-separated list of your favorite streams:
-
-* index.php?streams=gamingonlinux,linustechtips,...
-
-Assuming you host this service under the URL "https://tw2html.example.com", you can open up the streamlist like so:
-
-```
-https://tw2html.example.com/?streams=gamingonlinux,linustechtips
-```
-
-The site will show you a loading screen, while the status of streams are fetched in the background. Once the process is finished, the site refreshes by itself and shows you a list of online streams. You can watch them directly on tw2html via iframe-embedding (this transfers your IP and user-agent information to twitch.tv). Alternatively if your client can handle `streamlink://` schemes, you may open the stream via [streamlink](https://streamlink.github.io/) as well.
-
-## Requirements:
-
-- PHP-7.2 or higher
-
-## Further notes
-
-### streamlink:// scheme handler
-
-tw2html offers buttons with the custom `streamlink://` scheme. It gives you the opportunity to open up streams on your computer via streamlink.
-
-**For Mozilla Firefox:**
-
-Add following key in [`about:config`](about:config):
-
-- Key: `network.protocol-handler.expose.streamlink`
-- Type: Boolean
-- Value: `true`
-
-**For GNU/Linux:**
-
-In addition to the scheme handler in your browser (see above for Firefox), you need to add a streamlink-handler (e.g. in `~/.local/bin/streamlink-handler.sh`), such as:
-
-```bash
-#!/usr/bin/env bash
-
-function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
-
-URL=$(urldecode "$1" | sed -E -e 's/\?.*$//' -e 's/^streamlink/https/')
-TITLE=$(urldecode "$1" | sed -E -e 's/^.*?title=//')
-
-streamlink \
- --player "mpv" \
- --title "${TITLE}" \
- "${URL}" best
-```
-
-and the according `.desktop` file (e.g. in `~/.local/share/applications/streamlink-handler.desktop`):
-
-```
-[Desktop Entry]
-Type=Application
-Name=Streamlink Scheme Handler
-Exec=.local/bin/streamlink-handler.sh %u
-StartupNotify=false
-NoDisplay=true
-MimeType=x-scheme-handler/streamlink;
-```
-
-Afterwards, add the new scheme handler to xdg:
-```bash
-xdg-mime default streamlink-handler.desktop x-scheme-handler/streamlink
-```