|
ilja space
84e353c539
Add option for using custom url's through query parameters
I want the default and non-JS version to still show my personal things, so the JS is a bit ugly how it's done. But it should be usable as a demo or some tryout, so I think it's OK for now. |
||
|---|---|---|
| index.html | Add option for using custom url's through query parameters | |
| README.md | Add option for using custom url's through query parameters | |
ilja-live
This is a very simple page who embeds my default live stream from Spectra Video, as well as an IRC chat room on ilja.space.
It's quite simple, so if you want your own version of this, the best way is probably to clone it, change the url's, then host it yourself somewhere.
Extra
For those who don't want to go through the trouble of adapting and hosting their version of this page; I made it so that you can insert your own url's using query parameters. By default it will show my personal url's, but you can override them. The way I've done it is pretty ugly, though, so you probably want to create your own instead, but it could be valuable as a demo or for trying it out before going through more trouble.
The page has four components. It has an iframe showing the stream, an iframe showing a web interface for chat, and it has two links. One link is to the platform where the stream happens, the other links to the web interface for chat. You can override the url's for these components using query parameters:
live_embed_url: The url to the embed of the video, this embed will be shown on the live page.chat_webview_url: The url to a web view of the chat, this will be shown on the live page.live_source_url: The url to the source of the life stream, this will be shown as a link on the live page to open the video in a separate window.chat_source_url: The url to the source for the chat, this will be shown as a link on the live page to open the video in a separate window.
When live_source_url is provided, the text for this link will be adapted to a more generalised text than what I have for myself.
When you want to remove any of these components, you can provide the value false instead of an url.
Note that you need to "escape" special characters like hash # and ampersand &. For hash # you can use %23, for ampersand you can use %26.
Example:
Let's say you have a stream on https://example.com/stream , and chat on https://example.com/chat#my-chat . Let's say you do not wish to have a link to an original stream url and let's say that the chat is the same value for both embed and link. In that case, you'd add the following at the end of the url for this page ?live_embed_url=https://example.com/stream&chat_webview_url=https://example.com/chat%23my-chat&live_source_url=false&chat_source_url=https://example.com/chat%23my-chat.
Good luck, and happy streaming!
License
A simple website to combine live streaming and chat
Copyright (C) 2024 ilja@ilja.space
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.