2019-03-16 21:15:45 +01:00
|
|
|
{{define "header"}}
|
2019-03-17 22:31:48 +01:00
|
|
|
{{ if .Chat }}
|
|
|
|
<script type="application/javascript" src="/static/js/wasm_exec.js"></script>
|
|
|
|
<script type="application/javascript" src="/static/js/chat.js"></script>
|
|
|
|
<script>
|
|
|
|
maxMessageCount = {{ .MessageHistoryCount }}
|
|
|
|
</script>
|
|
|
|
<style>
|
|
|
|
.root {
|
|
|
|
display: grid;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
{{ end }}
|
2019-03-12 06:53:51 +01:00
|
|
|
|
2019-03-17 22:31:48 +01:00
|
|
|
{{ if .Video }}
|
|
|
|
<script type="application/javascript" src="/static/js/flv.min.js"></script>
|
|
|
|
<script type="application/javascript" src="/static/js/video.js"></script>
|
|
|
|
{{ if not .Chat }}
|
|
|
|
<style>
|
|
|
|
#videoElement {
|
|
|
|
height: 99vh;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2019-03-16 15:13:30 +01:00
|
|
|
|
2019-03-17 22:31:48 +01:00
|
|
|
{{ if and .Video .Chat }}
|
|
|
|
<style>
|
|
|
|
.root {
|
|
|
|
grid-template-columns: 5fr 1fr;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
{{ end }}
|
2019-03-16 21:15:45 +01:00
|
|
|
{{end}}
|
2019-03-10 21:45:10 +01:00
|
|
|
|
2019-03-16 21:15:45 +01:00
|
|
|
{{define "body"}}
|
2019-03-17 22:31:48 +01:00
|
|
|
{{ if .Video }}
|
|
|
|
<video id="videoElement" controls autoplay x5-video-player-type="h5" x5-video-player-fullscreen="true" playsinline
|
|
|
|
webkit-playsinline>
|
|
|
|
Your browser is too old and doesn't support HTML5 video.
|
|
|
|
</video>
|
|
|
|
{{ end }}
|
2019-03-12 06:53:51 +01:00
|
|
|
|
2019-03-17 22:31:48 +01:00
|
|
|
{{ if .Chat }}
|
|
|
|
<div id="chatwindow">
|
|
|
|
<div id="chat" style="display: none;">
|
|
|
|
<input id="hiddenColorPicker" type="color" hidden />
|
|
|
|
<div id="notifiyBox"></div>
|
|
|
|
<div id="hidden">
|
|
|
|
<div id="chatButtons">
|
|
|
|
<button class="button pretty-button" onclick="auth();">Auth</button>
|
|
|
|
<button class="button pretty-button" onclick="help();">Help</button>
|
|
|
|
<button class="button pretty-button" onclick="$('#hiddenColorPicker').trigger('click');">Color</button>
|
|
|
|
{{ if .Video }}
|
|
|
|
<button class="button pretty-button" onclick="initPlayer();">Reload Player</button>
|
|
|
|
{{ end }}
|
2019-03-16 15:13:30 +01:00
|
|
|
</div>
|
2019-03-17 22:31:48 +01:00
|
|
|
<hr />
|
2019-03-16 15:13:30 +01:00
|
|
|
</div>
|
2019-03-18 03:35:07 +01:00
|
|
|
<a id="playing" target="_blank"></a>
|
2019-03-17 22:31:48 +01:00
|
|
|
<div id="messages" class="scrollbar"></div>
|
|
|
|
<div id="msgbox">
|
|
|
|
<div id="suggestions"></div>
|
|
|
|
<textarea id="msg"></textarea>
|
|
|
|
</div>
|
|
|
|
<button id="send" class="button" onclick="sendChat();">Send</button>
|
|
|
|
<div>
|
|
|
|
<!-- This is an empty div so there can be an empty space below the send button -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="joinbox">
|
2019-03-18 03:35:07 +01:00
|
|
|
<div style="color: #e5e0e5; text-align: center;">Please enter your name<br />to join the chat</div>
|
|
|
|
<div>
|
|
|
|
<input id="name" maxlength="36">
|
|
|
|
<button id="join" class="button pretty-button" onclick="join();">Join</button>
|
|
|
|
</div>
|
2019-03-17 22:31:48 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{end}}
|