add frontend files and update nginx configs

master
Thomas Lynch 2 years ago
parent 610052319b
commit d9df81920a
No known key found for this signature in database
GPG Key ID: FBAB081F9B6E14B2
  1. 4
      nginx/stream.conf
  2. 1
      nginx/www/stream/css/video-js.min.css
  3. 55
      nginx/www/stream/dash.html
  4. BIN
      nginx/www/stream/favicon.ico
  5. 55
      nginx/www/stream/hls.html
  6. 19
      nginx/www/stream/js/dash.all.min.js
  7. 26
      nginx/www/stream/js/video.min.js
  8. 17
      nginx/www/stream/js/videojs-dash.min.js

@ -10,12 +10,12 @@ server {
deny all;
location /hls/ {
types { application/dash+xml mpd; application/vnd.apple.mpegurl m3u8; video/mp2t ts; }
types { application/vnd.apple.mpegurl m3u8; video/mp2t ts; }
root /tmp/;
}
location /dash/ {
types { application/dash+xml mpd; application/vnd.apple.mpegurl m3u8; video/mp2t ts; }
types { application/dash+xml mpd; audio/mp4 m4a; video/mp4 m4v; }
root /tmp/;
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width initial-scale=1">
<title>low key net stream (DASH)</title>
<link href="/css/video-js.min.css" rel="stylesheet">
<script src="/js/video.min.js"></script>
<style>
:root{--text-color:#c5c8c6;--bg-color:#1d1f21}
@media (prefers-color-scheme:light){:root{--text-color:#333;--bg-color:#EEE}}
body{display:flex;flex-direction:column;background-color:var(--bg-color);color:var(--text-color);font-family:Arial,Helvetica,sans-serif;text-align:center;height: calc(100vh - 20px);margin: 0;padding: 10px;}
.main{width:100%;height:100%;display:flex;align-items:center;max-height:90vh;}
#footer{margin-top:auto;padding-top:10px;}
video{max-width:100%;max-height:100%;display:flex;margin:0 auto;}
a,a:visited {color:unset;}
</style>
</head>
<body>
<div class="main">
<video id="video"
class="video-js vjs-default-skin"
controls
preload="auto"
style="max-width:100%;max-height:100%;display: flex;margin: 0 auto;"
data-setup='{}'>
</video>
</div>
<script>
const player = videojs('video', {
html5: {
vhs: {
experimentalBufferBasedABR: true
}
}
});
player.src({
src: 'http://stream.chan.loki/dash/tom.mpd',
type: 'application/dash+xml',
});
player.play();
</script>
<div id="footer">
<div>
<a href='http://stream.chan.loki/hls.html'>HLS</a> (<a href='http://stream.chan.loki/hls/tom.m3u8'>m3u8</a>)
</div>
<div>
<b><a href='http://stream.chan.loki/dash.html'>DASH</a></b> (<a href='http://stream.chan.loki/dash/tom.mpd'>mpd</a>)
</div>
<div>
RTMP (<a href='rtmp://stream.chan.loki/live/tom'>rtmp://</a>)
</div>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width initial-scale=1">
<title>low key net stream (HLS)</title>
<link href="/css/video-js.min.css" rel="stylesheet">
<script src="/js/video.min.js"></script>
<style>
:root{--text-color:#c5c8c6;--bg-color:#1d1f21}
@media (prefers-color-scheme:light){:root{--text-color:#333;--bg-color:#EEE}}
body{display:flex;flex-direction:column;background-color:var(--bg-color);color:var(--text-color);font-family:Arial,Helvetica,sans-serif;text-align:center;height: calc(100vh - 20px);margin: 0;padding: 10px;}
.main{width:100%;height:100%;display:flex;align-items:center;max-height:90vh;}
#footer{margin-top:auto;padding-top:10px;}
video{max-width:100%;max-height:100%;display:flex;margin:0 auto;}
a,a:visited {color:unset;}
</style>
</head>
<body>
<div class="main">
<video id="video"
class="video-js vjs-default-skin"
controls
preload="auto"
style="max-width:100%;max-height:100%;display: flex;margin: 0 auto;"
data-setup='{}'>
</video>
</div>
<script>
const player = videojs('video', {
html5: {
vhs: {
experimentalBufferBasedABR: true
}
}
});
player.src({
src: 'http://stream.chan.loki/hls/tom.m3u8',
type: 'application/vnd.apple.mpegurl',
});
player.play();
</script>
<div id="footer">
<div>
<b><a href='http://stream.chan.loki/hls.html'>HLS</a></b> (<a href='http://stream.chan.loki/hls/tom.m3u8'>m3u8</a>)
</div>
<div>
<a href='http://stream.chan.loki/dash.html'>DASH</a> (<a href='http://stream.chan.loki/dash/tom.mpd'>mpd</a>)
</div>
<div>
RTMP (<a href='rtmp://stream.chan.loki/live/tom'>rtmp://</a>)
</div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save