satyr/templates/base.njk
knotteye 4bd10151f8 Switch from video.js to dash.js, it seems to be more consistent and hiccup less during streams.
This means transcoding to HLS is no longer an option.
Also add a bit of JS to reload the stream periodically if it hadn't started when the page was loaded.
That thing spits out errors fucking constantly, so hopefully it won't cause any problems.
2020-06-27 12:11:42 -05:00

47 lines
1.5 KiB
Plaintext

<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="/styles.css">
<link rel="stylesheet" type="text/css" href="/local.css">
<link rel="icon" type="image/svg" href="/logo.svg">
<title>{{ sitename }}</title>
<script>
//should check for and refresh login tokens on pageload..
if(document.cookie.match(/^(.*;)?\s*Authorization\s*=\s*[^;]+(.*)?$/) !== null) {
var xhr = new XMLHttpRequest();
xhr.open("POST", "/api/login", true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.send("");
}
</script>
{% block head %}
{% endblock %}
</head>
<body onload="startVideo()">
<div id="wrapper">
<div id="header">
<span style="float:left;"><h4><a href="/">{{ sitename }}</a> | <a href="/users">Users</a> <a href="/users/live">Live</a> <a href="/about">About</a></h4></span><span style="float:right;"><h4><a href="/help">Help</a> | {% if auth.is %}<a href="/profile">{{ auth.name }}{% else %}<a href="/login">Log In{% endif %}</a></h4></span>
</div>
<div id="content">
{% block content %}
{% endblock %}
</div>
<div id="footer">
<div>
<div>
<b>Satyr</b></br>
<a href="https://gitlab.com/knotteye/satyr">About</a></br>
<a href="https://gitlab.com/knotteye/satyr/-/releases">v{{ version }}</a>
</div>
<div>
<img src="/logo.svg" height="50" />
</div>
<div>
<b>{{ sitename }}</b></br>
<a href="/about">About</a></br>
<a href="mailto:{{ email }}">Contact</a>
</div>
</div>
</div>
</div>
</body>