anonstream/anonstream/templates/nojs_stream.html

52 行
1.2 KiB
HTML

{##
# SPDX-FileCopyrightText: 2022 n9k <https://git.076.ne.jp/ninya9k>
# SPDX-License-Identifier: AGPL-3.0-or-later
##}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-security-policy" content="default-src 'none'; media-src 'self'; style-src 'nonce-{{ csp }}';">
<style nonce="{{ csp }}">
html {
height: 100%;
}
body {
height: 100%;
margin: 0;
overflow: hidden;
color: #ddd;
font-family: sans-serif;
background-color: black;
}
{% if online %}
#video {
width: 100%;
height: 100%;
}
{% else %}
#offline {
width: 100%;
height: 100%;
text-align: center;
display: grid;
align-content: center;
font-size: 20pt;
user-select: none;
}
#offline > h1 {
margin: 0;
}
{% endif %}
</style>
</head>
<body>
{% if online %}
<video id="video" src="{{ url_for('stream', token=user.token) }}" autoplay controls></video>
{% else %}
<header id="offline"><h1>{{ locale.offline }}</h1></header>
{% endif %}
</body>
</html>