Hopefully resolves issues with videojs occasionally not initializing the player

merge-requests/7/head
knotteye 2019-12-07 10:51:26 -06:00
parent 8da1310e24
commit a0be256a64
2 changed files with 11 additions and 6 deletions

View File

@ -4,6 +4,8 @@
<link rel="stylesheet" type="text/css" href="/local.css"> <link rel="stylesheet" type="text/css" href="/local.css">
<link rel="icon" type="image/svg" href="/logo.svg"> <link rel="icon" type="image/svg" href="/logo.svg">
<title>{{ sitename }}</title> <title>{{ sitename }}</title>
{% block head %}
{% endblock %}
</head> </head>
<body> <body>
<div id="wrapper"> <div id="wrapper">

View File

@ -1,4 +1,8 @@
{% extends "base.njk" %} {% extends "base.njk" %}
{% block head %}
<script src="/videojs/video.min.js"></script>
<link rel="stylesheet" type="text/css" href="/videojs/video-js.min.css">
{% endblock %}
{% block content %} {% block content %}
<script> <script>
function newPopup(url) { function newPopup(url) {
@ -16,10 +20,11 @@ function newPopup(url) {
<iframe src="/chat?room={{ username }}" frameborder="0" style="width: 100%;height: 100%; min-height: 500px;" allowfullscreen></iframe> <iframe src="/chat?room={{ username }}" frameborder="0" style="width: 100%;height: 100%; min-height: 500px;" allowfullscreen></iframe>
</div> </div>
</div> </div>
<script>window.HELP_IMPROVE_VIDEOJS = false;</script> </br>
<script src="/videojs/video.min.js"></script> <noscript>The webclients for the stream and the chat require javascript, but feel free to use the direct links above!</br></br></noscript>
<link rel="stylesheet" type="text/css" href="/videojs/video-js.min.css"> {{ about | escape }}
<script> <script>
window.HELP_IMPROVE_VIDEOJS = false;
var player = videojs('live-video', { var player = videojs('live-video', {
html: { html: {
nativeCaptions: false, nativeCaptions: false,
@ -34,7 +39,5 @@ function newPopup(url) {
type: 'application/dash+xml' type: 'application/dash+xml'
}); });
}) })
</script></br> </script>
<noscript>The webclients for the stream and the chat require javascript, but feel free to use the direct links above!</br></br></noscript>
{{ about | escape }}
{% endblock %} {% endblock %}