Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

updates towards more customization

Ginger Wongb39824b8c3bc
diff --git a/webroot/img/logo128.png b/webroot/img/logo128.png
new file mode 100644
index 0000000000..243e00b0e2
Binary files /dev/null and b/webroot/img/logo128.png differ
diff --git a/webroot/img/logo256.png b/webroot/img/logo256.png
new file mode 100644
index 0000000000..ccf36a87cb
Binary files /dev/null and b/webroot/img/logo256.png differ
diff --git a/webroot/index.html b/webroot/index.html
index a1e2f75e4f..32cb6ff3cb 100644
--- a/webroot/index.html
+++ b/webroot/index.html
@@ -29,12 +29,15 @@ GW TODO:
*/
</script>
<body class="bg-gray-300 text-gray-800">
- <main id="app-container" class="flex no-chat">
+ <div id="app-container" v-cloak class="flex no-chat">
<div id="top-content">
<header class="flex border-b border-gray-900 border-solid shadow-md">
- <h1 class="text-gray-400">
- 😈 {{title}}
+ <h1 v-cloak class="flex text-gray-400">
+ <span id="logo-container" class="rounded-full bg-white mx-2 px-1 py-1">
+ <img class="logo" src="./img/logo128.png">
+ </span>
+ <span>{{title}}</span>
</h1>
<div id="user-options-container" class="flex">
@@ -61,49 +64,59 @@ GW TODO:
</header>
-
- <div id="video-container" class="flex owncast-video-container bg-black">
- <video
- class="video-js"
- id="video"
- preload="auto"
- controls
- autoplay
- playsinline
- muted
- poster="/thumbnail.png"
- data-setup='{"vhs": { "enableLowInitialPlaylist": true, "smoothQualityChange": true, "handlePartialData": true }}'
- >
- <source src="hls/stream.m3u8" type="application/x-mpegURL"/>
- </video>
- </div>
+ <main>
+ <div id="video-container" class="flex owncast-video-container bg-black">
+ <video
+ class="video-js"
+ id="video"
+ preload="auto"
+ controls
+ autoplay
+ playsinline
+ muted
+ poster="/thumbnail.png"
+ data-setup='{"vhs": { "enableLowInitialPlaylist": true, "smoothQualityChange": true, "handlePartialData": true }}'
+ >
+ <source src="hls/stream.m3u8" type="application/x-mpegURL"/>
+ </video>
+ </div>
- <div id="stream-info" class="flex font-mono bg-gray-900 text-indigo-200 shadow-md border-b border-gray-100 border-solid">
- <span>{{ streamStatus }}</span>
- <span>{{ viewerCount }} {{ 'viewer' | plural(viewerCount) }}.</span>
- <span>Max {{ sessionMaxViewerCount }} {{ 'viewer' | plural(sessionMaxViewerCount) }}.</span>
- <span>{{ overallMaxViewerCount }} overall.</span>
- </div>
+ <div id="stream-info" v-cloak class="flex font-mono bg-gray-900 text-indigo-200 shadow-md border-b border-gray-100 border-solid">
+ <span>{{ streamStatus }}</span>
+ <span>{{ viewerCount }} {{ 'viewer' | plural(viewerCount) }}.</span>
+ <span>Max {{ sessionMaxViewerCount }} {{ 'viewer' | plural(sessionMaxViewerCount) }}.</span>
+ <span>{{ overallMaxViewerCount }} overall.</span>
+ </div>
+ </main>
- <div id="user-content" class="user-content">
+ <section id="user-content" class="user-content">
<!-- USER CONTENT... -->
<div v-html="description"></div>
- </div>
- </div>
-
-
- <div id="chat-container-wrap" class="flex">
+ <footer class="flex border-t border-gray-500 border-solid">
+ <span>
+ <a href="https://github.com/gabek/owncast" target="_blank">About Owncast</a>
+ </span>
+ </footer>
+ </section>
+ </div>
+ <section id="chat-container-wrap" class="flex">
<div id="user-content-touch" class="user-content">
<!-- USER CONTENT... -->
<div v-html="description"></div>
+
+ <!-- need a better way to duplicate footer, use VUE component-->
+ <footer class="flex border-t border-gray-500 border-solid">
+ <span>
+ <a href="https://github.com/gabek/owncast" target="_blank">About Owncast</a>
+ </span>
+ </footer>
</div>
- <div id="chat-container" class="bg-gray-800">
-
+ <div id="chat-container" class="bg-gray-800">
<div id="messages-container">
<div v-for="message in messages">
<div class="message flex">
@@ -148,8 +161,8 @@ GW TODO:
- </div>
- </main>
+ </section>
+ </div>
<script src="js/status.js"></script>
<script src="js/usercolors.js"></script>
diff --git a/webroot/js/app.js b/webroot/js/app.js
index e36f07de55..1ededd5a30 100644
--- a/webroot/js/app.js
+++ b/webroot/js/app.js
@@ -1,11 +1,5 @@
async function setupApp() {
- Vue.filter('plural', function (string, count) {
- if (count === 1) {
- return string;
- } else {
- return string + "s";
- }
- })
+ Vue.filter('plural', pluralize);
window.app = new Vue({
diff --git a/webroot/js/utils.js b/webroot/js/utils.js
index 302e4af20d..6ef317bf89 100644
--- a/webroot/js/utils.js
+++ b/webroot/js/utils.js
@@ -47,6 +47,15 @@ function addNewlines(str) {
return str.replace(/(?:\r\n|\r|\n)/g, '<br />');
}
+function pluralize(string, count) {
+ if (count === 1) {
+ return string;
+ } else {
+ return string + "s";
+ }
+}
+
+
// Trying to determine if browser is mobile/tablet.
// Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent
function hasTouchScreen() {
diff --git a/webroot/styles/layout.css b/webroot/styles/layout.css
index 12f25e3456..7e7f3763d8 100644
--- a/webroot/styles/layout.css
+++ b/webroot/styles/layout.css
@@ -1,6 +1,6 @@
/* variables */
:root {
- --header-height: 3em;
+ --header-height: 3.5em;
--right-col-width: 24em;
--video-container-height: 50vh;
--header-bg-color: rgba(20,0,40,1);
@@ -19,6 +19,10 @@ ul {
list-style: unset;
}
+a:hover {
+ text-decoration: underline;
+}
+[v-cloak] { visibility: hidden; }
::-webkit-scrollbar {
width: 0px;
@@ -52,7 +56,15 @@ header h1 {
text-transform: uppercase;
padding: .5em;
white-space: nowrap;
- width: 20em;
+ /* width: 20em; */
+ justify-content: flex-start;
+ align-items: center;
+ flex-direction: row;
+}
+img.logo {
+ height: 1.2em;
+ width: 1.2em;
+ display: inline-block;
}
#chat-toggle {
@@ -64,6 +76,12 @@ header h1 {
align-items: center;
}
+footer {
+ flex-direction: row;
+ justify-content: center;
+ font-size: .75em;
+ padding: 2em 0;
+}
/* ************************************************8 */