diff --git a/app/javascript/entrypoints/viewer.js b/app/javascript/entrypoints/viewer.js index 3a66373d29..712abddc9e 100644 --- a/app/javascript/entrypoints/viewer.js +++ b/app/javascript/entrypoints/viewer.js @@ -1,9 +1,4 @@ import UVManager from '@viewer/uv_manager' import 'leaflet/dist/leaflet.css' const UVManagerInstance = new UVManager() -let timer = window.setInterval(() => { - if (window.Hls !== undefined) { - UVManagerInstance.initialize() - window.clearInterval(timer) - } -}, 5) +UVManagerInstance.initialize() diff --git a/app/views/layouts/viewer_layout.html.erb b/app/views/layouts/viewer_layout.html.erb index bdb758f817..1c295c9822 100644 --- a/app/views/layouts/viewer_layout.html.erb +++ b/app/views/layouts/viewer_layout.html.erb @@ -2,7 +2,6 @@
<%= csrf_meta_tag %> - <%= vite_javascript_tag 'viewer' %> <%= stylesheet_link_tag 'viewer' %> <%= yield :head %> diff --git a/package.json b/package.json index 0990a74616..33fe3a9264 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "flush-promises": "^1.0.2", "graphql": "^16.5.0", "graphql-tag": "^2.9.2", + "hls.js": "^1.4.10", "leaflet": "^1.7.1", "lodash": "^4.17.21", "lux-design-system": "4.2.0", diff --git a/yarn.lock b/yarn.lock index 35b3ce9604..5ea2492ddb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5694,6 +5694,11 @@ he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +hls.js@^1.4.10: + version "1.4.10" + resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.4.10.tgz#3feac40f21a558453b243b5b926b7317e70624e1" + integrity sha512-wAVSj4Fm2MqOHy5+BlYnlKxXvJlv5IuZHjlzHu18QmjRzSDFQiUDWdHs5+NsFMQrgKEBwuWDcyvaMC9dUzJ5Uw== + hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"