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>
|
<script>
|
||||||
var video = document.getElementById("video");
|
var video = document.getElementById("video");
|
||||||
var label = document.getElementById("stream");
|
var label = document.getElementById("stream");
|
||||||
var path = window.location.pathname.replace(/^\/+|\/+$/g, "");
|
var match = window.location.pathname.match(/^\/play\/([^/]+)\/?$/);
|
||||||
var name = path && !path.startsWith("live/") ? path.split("/")[0] : "stream";
|
var name = match ? decodeURIComponent(match[1]) : "stream";
|
||||||
var source = "https://stream.mizuki.guru/live/" + name + "/" + name + ".m3u8";
|
var source = "https://stream.mizuki.guru/live/" + name + "/" + name + ".m3u8";
|
||||||
|
|
||||||
label.textContent = source;
|
label.textContent = source;
|
||||||
|
|
@ -183,12 +183,24 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
virtualHosts."stream.mizuki.guru".extraConfig = ''
|
virtualHosts."stream.mizuki.guru".extraConfig = ''
|
||||||
@hls path_regexp hls ^/[^/]+/[^/]+/[^/]+\.(m3u8|ts)$
|
handle /live/* {
|
||||||
reverse_proxy @hls 127.0.0.1:10023
|
reverse_proxy 127.0.0.1:10023
|
||||||
|
}
|
||||||
|
|
||||||
root * ${streamPlayer}
|
handle /play/* {
|
||||||
try_files {path} /index.html
|
root * ${streamPlayer}
|
||||||
file_server
|
rewrite * /index.html
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
|
||||||
|
handle / {
|
||||||
|
root * ${streamPlayer}
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
|
||||||
|
handle {
|
||||||
|
respond "Not Found" 404
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
virtualHosts."netbird.mizuki.guru".extraConfig = ''
|
virtualHosts."netbird.mizuki.guru".extraConfig = ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue