Skip to content

Commit

Permalink
Use hls package
Browse files Browse the repository at this point in the history
  • Loading branch information
hackartisan committed Aug 11, 2023
1 parent 8ad09eb commit 3577cb6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
7 changes: 1 addition & 6 deletions app/javascript/entrypoints/viewer.js
Original file line number Diff line number Diff line change
@@ -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()
2 changes: 1 addition & 1 deletion app/javascript/viewer/uv_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export default class UVManager {
this.uvElement.height(windowHeight - titleHeight - tabHeight)
this.uvElement.children('div').height(windowHeight - titleHeight - tabHeight)
if (this.uv) { this.uv.resize() }
this.waitForElementToDisplay('button.share', 500, this.addViewerIcons.bind(this))
// this.waitForElementToDisplay('button.share', 500, this.addViewerIcons.bind(this))
}

bindResize () {
Expand Down
1 change: 0 additions & 1 deletion app/views/layouts/viewer_layout.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<%= csrf_meta_tag %>
<script src="https://cdn.jsdelivr.net/npm/hls.js@1"></script>
<%= vite_javascript_tag 'viewer' %>
<%= stylesheet_link_tag 'viewer' %>
<%= yield :head %>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3577cb6

Please sign in to comment.