pub / tw2html

Checks online status of streams on twitch.tv and lets you watch them
git clone https://src.jayvii.de/pub/tw2html.git
Home | Log | Files | Exports | Refs | README | RSS

commit 5103859dbcf3ef3eb5ea826d9eccd574c29e594a
parent 60c697f7d82f0c9a7aba9a2fc4f81df0d02d1fdc
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sat, 24 Feb 2024 18:35:49 +0100

add further notes

Diffstat:
MREADME.md | 24++++++++++++++++++++++++
1 file changed, 24 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -20,3 +20,27 @@ The site will show you a loading screen, while the status of streams are fetched ## 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 GNU/Linux:** + +You need to add a streamlink-handler, 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 +```