diff options
-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 () { |