summaryrefslogtreecommitdiff
path: root/localwebsite
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-05-26 02:23:21 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-05-26 02:23:21 +0300
commit997c6da6c40c11ec0bc6cc749f78deca8dd95db1 (patch)
tree74708fa7ab1afe60aa08add0b1d9a3526c65c6a0 /localwebsite
parentb46401b5a91f63917157dee40e986d3d3091025b (diff)
localwebsite: hls.js usage upd
Diffstat (limited to 'localwebsite')
-rw-r--r--localwebsite/templates-web/cams.twig7
1 files changed, 6 insertions, 1 deletions
diff --git a/localwebsite/templates-web/cams.twig b/localwebsite/templates-web/cams.twig
index 71642ee..eb9e6d0 100644
--- a/localwebsite/templates-web/cams.twig
+++ b/localwebsite/templates-web/cams.twig
@@ -25,7 +25,12 @@ function setupHls(video, name, useHls) {
// This is using the built-in support of the plain video element, without using hls.js.
if (useHls) {
- var hls = new Hls({{ hls_opts|json_encode|raw }});
+ var config = {{ hls_opts|json_encode|raw }};
+ config.xhrSetup = function (xhr,url) {
+ xhr.withCredentials = true;
+ };
+
+ var hls = new Hls(config);
hls.loadSource(src);
hls.attachMedia(video);
hls.on(Hls.Events.MEDIA_ATTACHED, function () {