diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-05-22 23:38:33 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-05-23 00:35:46 +0300 |
commit | 225ad92fdac725060d0ecb0c82a046653782d182 (patch) | |
tree | 8b7759c514d3774bc6c2dfc85ba9e8ed066651f8 /localwebsite/handlers/MiscHandler.php | |
parent | 02f676029a5014e822598947b0ac2f12d183a7f1 (diff) |
support street cameras
Diffstat (limited to 'localwebsite/handlers/MiscHandler.php')
-rw-r--r-- | localwebsite/handlers/MiscHandler.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/localwebsite/handlers/MiscHandler.php b/localwebsite/handlers/MiscHandler.php index 4f35981..314920a 100644 --- a/localwebsite/handlers/MiscHandler.php +++ b/localwebsite/handlers/MiscHandler.php @@ -49,4 +49,17 @@ class MiscHandler extends RequestHandler $this->tpl->render_page('pump.twig'); } + public function GET_cams() { + global $config; + + $this->tpl->add_external_static('js', 'https://cdn.jsdelivr.net/npm/hls.js@latest'); + + $this->tpl->set([ + 'hls_host' => $config['cam_hls_host'], + 'cams' => $config['cam_list'] + ]); + $this->tpl->set_title('Камеры'); + $this->tpl->render_page('cams.twig'); + } + }
\ No newline at end of file |