2019-09-28 21:43:25 -05:00
{% extends "base.njk" %}
2019-12-07 10:51:26 -06:00
{% block head %}
2020-06-27 12:11:42 -05:00
<!--<script src="/videojs/video.min.js"></script>
<link rel="stylesheet" type="text/css" href="/videojs/video-js.min.css">-->
<script src="/dashjs/dash.all.min.js"></script>
<script>
function startVideo(){
var url = "/live/{{username}}/index.mpd";
var player = dashjs.MediaPlayer().create();
player.initialize(document.querySelector("#videoPlayer"), url, true);
console.log('called startvideo');
}
</script>
2019-12-07 10:51:26 -06:00
{% endblock %}
2019-09-28 21:43:25 -05:00
{% block content %}
2019-10-20 16:09:28 -05:00
<script>
function newPopup(url) {
popupWindow = window.open(
url,'popUpWindow','height=700,width=450,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=yes')
}
</script>
2019-10-05 14:34:57 -05:00
</br>
2019-11-25 11:38:12 -06:00
<span style="float: left;font-size: large;"><a href="/live/{{ username }}/index.mpd">{{ username }}</a> | {{ title | escape }}</b></span><span style="float: right;font-size: large;"> Links | <a href="rtmp://{{ domain }}/live/{{ username }}">Watch</a> <a href="JavaScript:newPopup('/chat?room={{ username }}');">Chat</a> <a href="/vods/{{ username }}">VODs</a></span>
2019-09-28 21:43:25 -05:00
<div id="jscontainer">
<div id="jschild" style="width: 70%;height: 100%;">
2020-06-27 12:11:42 -05:00
<!--<video controls poster="/thumbnail.jpg" class="video-js vjs-default-skin" id="live-video" style="width:100%;height:100%;min-height: 500px;"></video>-->
<video id="videoPlayer" style="width:100%;height:100%;width: 950px;height: 534px;background-color: rgb(0, 0, 0);" poster="/thumbnail.jpg" autoplay muted></video>
<!--this spits errors fucking constantly after it tries to reload a video that's already running.. I dunno if it's bad or causing problems so let's just push it to develop and wait for issues!-->
<!--it plays the stream without reloading the page tho lol-->
<script>window.setInterval(startVideo, 60000)</script>
2019-09-28 21:43:25 -05:00
</div>
2019-12-04 18:48:02 -06:00
<div id="jschild" class="webchat" style="width: 30%;height: 100%;position: relative;">
2020-06-27 12:11:42 -05:00
<iframe src="/chat?room={{ username }}" frameborder="0" style="width: 100%;height: 100%; min-height: 534px;" allowfullscreen></iframe>
2019-09-28 21:43:25 -05:00
</div>
</div>
2019-12-07 10:51:26 -06:00
</br>
<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 }}
2020-06-27 12:11:42 -05:00
<!--<script>
2019-12-07 10:51:26 -06:00
window.HELP_IMPROVE_VIDEOJS = false;
2019-09-28 21:43:25 -05:00
var player = videojs('live-video', {
html: {
nativeCaptions: false,
},
});
player.ready(function() {
player.on("error", () => {
document.querySelector(".vjs-modal-dialog-content").textContent = "The stream is currently offline.";
});
player.src({
2019-11-25 11:38:12 -06:00
src: '/live/{{ username }}/index.mpd',
2019-11-10 10:29:15 -06:00
type: 'application/dash+xml'
2019-09-28 21:43:25 -05:00
});
})
2020-06-27 12:11:42 -05:00
</script>-->
2019-09-28 21:43:25 -05:00
{% endblock %}