Skip to content

Commit

Permalink
[WIP] use hls via cdn
Browse files Browse the repository at this point in the history
This doesn't make audio work though
  • Loading branch information
hackartisan committed Aug 10, 2023
1 parent db9c7c3 commit 8ad09eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/javascript/entrypoints/viewer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import UVManager from '@viewer/uv_manager'
import 'leaflet/dist/leaflet.css'
const UVManagerInstance = new UVManager()
UVManagerInstance.initialize()
let timer = window.setInterval(() => {
if (window.Hls !== undefined) {
UVManagerInstance.initialize()
window.clearInterval(timer)
}
}, 5)
1 change: 1 addition & 0 deletions app/views/layouts/viewer_layout.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<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

0 comments on commit 8ad09eb

Please sign in to comment.