import hls.js

This commit is contained in:
deflax 2021-10-12 19:36:58 +00:00
parent 15bac63561
commit ff7447440c
2 changed files with 8 additions and 2 deletions

View file

@ -15,9 +15,13 @@ RUN mkdir -p /tmp/hls.js && \
cd /tmp/hls.js && \
wget -O hls.js.zip https://github.com/video-dev/hls.js/releases/download/v1.0.11/release.zip && \
unzip hls.js.zip && \
cp dist/hls.js /code/static/hls.js && \
cp dist/hls.js.map /code/static/hls.js.map && \
cp dist/hls.min.js /code/static/hls.min.js && \
cp dist/hls.min.js.map /code/static/hls.min.js.map
RUN chmod 644 /code/static/hls.js
RUN chmod 644 /code/static/hls.js.map
RUN chmod 644 /code/static/hls.min.js
RUN chmod 644 /code/static/hls.min.js.map

View file

@ -6,16 +6,18 @@
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.default.css') }}">
</head>
<body>
<script src="{{ url_for('static', filename='hls.min.js') }}"></script>
<header>
<a href="{{ url_for('frontend.start') }}"><h1>{{ configuration["pagetitle"] }}</h1></a>
<h2>{{ configuration["subtitle"] }}</h2>
</header>
<div id="videocontainer">
<h1>{{ streamname }}</h1>
<h1>{{ stream }}</h1>
<video id="player" controls>
</video>
</div>
<script src="{{ url_for('static', filename='hls.min.js') }}"></script>
<script>
var video = document.getElementById('video');
if (Hls.isSupported()) {