diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-05-26 02:23:21 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-05-26 02:23:21 +0300 |
commit | 997c6da6c40c11ec0bc6cc749f78deca8dd95db1 (patch) | |
tree | 74708fa7ab1afe60aa08add0b1d9a3526c65c6a0 /localwebsite | |
parent | b46401b5a91f63917157dee40e986d3d3091025b (diff) |
localwebsite: hls.js usage upd
Diffstat (limited to 'localwebsite')
-rw-r--r-- | localwebsite/templates-web/cams.twig | 7 |
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 () { |