wow
Some checks failed
CI / check (push) Has been cancelled
CI / ida (push) Has been cancelled
CI / cpt (push) Has been cancelled
CI / build-nixos (ena) (push) Has been cancelled
CI / build-nixos (hako) (push) Has been cancelled
CI / build-nixos (kazusa) (push) Has been cancelled
CI / build-nixos (mizuki) (push) Has been cancelled
Some checks failed
CI / check (push) Has been cancelled
CI / ida (push) Has been cancelled
CI / cpt (push) Has been cancelled
CI / build-nixos (ena) (push) Has been cancelled
CI / build-nixos (hako) (push) Has been cancelled
CI / build-nixos (kazusa) (push) Has been cancelled
CI / build-nixos (mizuki) (push) Has been cancelled
This commit is contained in:
parent
c7cb0211dd
commit
fd667ed303
1 changed files with 19 additions and 7 deletions
|
|
@ -68,8 +68,8 @@ let
|
|||
<script>
|
||||
var video = document.getElementById("video");
|
||||
var label = document.getElementById("stream");
|
||||
var path = window.location.pathname.replace(/^\/+|\/+$/g, "");
|
||||
var name = path && !path.startsWith("live/") ? path.split("/")[0] : "stream";
|
||||
var match = window.location.pathname.match(/^\/play\/([^/]+)\/?$/);
|
||||
var name = match ? decodeURIComponent(match[1]) : "stream";
|
||||
var source = "https://stream.mizuki.guru/live/" + name + "/" + name + ".m3u8";
|
||||
|
||||
label.textContent = source;
|
||||
|
|
@ -183,12 +183,24 @@ in
|
|||
'';
|
||||
|
||||
virtualHosts."stream.mizuki.guru".extraConfig = ''
|
||||
@hls path_regexp hls ^/[^/]+/[^/]+/[^/]+\.(m3u8|ts)$
|
||||
reverse_proxy @hls 127.0.0.1:10023
|
||||
handle /live/* {
|
||||
reverse_proxy 127.0.0.1:10023
|
||||
}
|
||||
|
||||
root * ${streamPlayer}
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
handle /play/* {
|
||||
root * ${streamPlayer}
|
||||
rewrite * /index.html
|
||||
file_server
|
||||
}
|
||||
|
||||
handle / {
|
||||
root * ${streamPlayer}
|
||||
file_server
|
||||
}
|
||||
|
||||
handle {
|
||||
respond "Not Found" 404
|
||||
}
|
||||
'';
|
||||
|
||||
virtualHosts."netbird.mizuki.guru".extraConfig = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue