owncast/webroot/index.html

169 lines
7 KiB
HTML
Raw Normal View History

<html>
2020-06-02 09:50:32 +03:00
<head>
<meta charset="UTF-8" />
2020-06-15 04:20:04 +03:00
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
2020-06-14 11:10:26 +03:00
<title>Owncast Demo Server</title>
2020-06-02 09:50:32 +03:00
2020-06-14 09:38:09 +03:00
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<!-- unpkg : use the latest version of Video.js -->
2020-06-14 09:38:09 +03:00
<link href="//unpkg.com/video.js/dist/video-js.min.css" rel="stylesheet">
<link href="https://unpkg.com/@videojs/themes@1/dist/fantasy/index.css" rel="stylesheet" />
<script src="//unpkg.com/video.js/dist/video.min.js"></script>
2020-06-02 09:50:32 +03:00
2020-06-03 01:37:36 +03:00
<script src="vendor/autolink.js"></script>
2020-06-14 09:38:09 +03:00
<link href="./styles/layout.css" rel="stylesheet" />
2020-06-02 09:50:32 +03:00
</head>
<script>
/*
GW TODO:
- off line/ video done mode.
- remove listeners on unload?
2020-06-16 01:45:55 +03:00
- config customizations
mobile yucks:
problems;
- mobile browsers need custom vh calculation due to browser chrome taken into consideration
- mobile chrome softkeyboard changes perceived width of page, alters layout
- chat windwo placementis messedup on orientation changes.. needs new vh.
orientationchange oly happens on mobile.
does orientationchange happen when keyboard appears?
- changing vh after orientation change sometimes yields same value
2020-06-16 01:45:55 +03:00
possible hacks
- if mobile, don't show chat + chat icon in landscape?..
2020-06-02 09:50:32 +03:00
*/
</script>
2020-06-15 09:12:58 +03:00
<body class="bg-gray-300 text-gray-800">
2020-06-14 06:15:31 +03:00
<div id="app-container" class="flex no-chat">
2020-06-15 09:12:58 +03:00
<header class="flex border-b border-gray-900 border-solid shadow-md">
<h1 class="text-gray-400">
2020-06-14 06:15:31 +03:00
😈 Owncast
2020-06-04 11:31:47 +03:00
</h1>
2020-06-14 06:15:31 +03:00
<div id="user-options-container" class="flex">
<div id="user-info">
<div id="user-info-display" title="Click to update user name" class="flex">
2020-06-15 09:12:58 +03:00
<img src="https://robohash.org/username123" id="username-avatar" class="rounded-full bg-black bg-opacity-50 border border-solid border-gray-700" />
<span id="username-display" class="text-indigo-600"></span>
2020-06-14 06:15:31 +03:00
</div>
<div id="user-info-change">
<input type="text"
id="username-change-input"
2020-06-15 09:12:58 +03:00
class="appearance-none block w-full bg-gray-200 text-gray-700 border border-black-500 rounded py-1 px-1 leading-tight focus:bg-white"
2020-06-14 06:15:31 +03:00
value="Random Username 123"
maxlength="100"
placeholder="Update username"
>
<button id="button-update-username" class="bg-blue-500 hover:bg-blue-700 text-white py-1 px-1 rounded user-btn">Update</button>
2020-06-15 09:12:58 +03:00
<button id="button-cancel-change" class="bg-gray-900 hover:bg-gray-800 py-1 px-2 rounded user-btn text-white text-opacity-50" title="cancel">X</button>
2020-06-14 06:15:31 +03:00
</div>
</div>
2020-06-15 09:12:58 +03:00
<button type="button" id="chat-toggle" class="flex bg-gray-800 hover:bg-gray-700">💬</button>
2020-06-14 06:15:31 +03:00
</div>
2020-06-04 13:15:27 +03:00
2020-06-04 11:31:47 +03:00
</header>
2020-06-14 06:15:31 +03:00
<div id="main-content-container" class="flex">
2020-06-04 11:31:47 +03:00
<!-- LEFT CONTAINER SIDE-->
<div class="flex main-cols left-col">
2020-06-02 09:50:32 +03:00
2020-06-15 09:12:58 +03:00
<div id="video-container" class="flex owncast-video-container bg-black">
2020-06-04 11:31:47 +03:00
<video
2020-06-15 05:15:24 +03:00
class="video-js"
2020-06-04 11:31:47 +03:00
id="video"
preload="auto"
controls
2020-06-14 08:15:58 +03:00
autoplay
playsinline
2020-06-14 08:15:58 +03:00
muted
2020-06-15 08:26:31 +03:00
poster="/thumbnail.png"
data-setup='{}'
>
2020-06-15 08:26:31 +03:00
<source src="hls/stream.m3u8" type="application/x-mpegURL"/>
</video>
2020-06-02 09:50:32 +03:00
</div>
2020-06-02 23:56:59 +03:00
2020-06-15 09:12:58 +03:00
<div id="stream-info" class="flex font-mono bg-gray-900 text-indigo-200 shadow-md border-b border-gray-100 border-solid">
2020-06-15 02:32:39 +03:00
<span>{{ streamStatus }}</span>
<span>{{ viewerCount }} {{ 'viewer' | plural(viewerCount) }}.</span>
2020-06-15 03:02:10 +03:00
<span>Max {{ sessionMaxViewerCount }} {{ 'viewer' | plural(sessionMaxViewerCount) }}.</span>
2020-06-15 02:32:39 +03:00
<span>{{ overallMaxViewerCount }} overall.</span>
</div>
<div id="user-content">
<!-- USER CONTENT... -->
<div>
Blathers is an owl with brown feathers. His face is white and he has a yellow beak. His arms are wing shaped and he has yellow talons. His eyes are very big with small black irises. He also has big pink cheek circles on his cheeks. His belly appears to be checkered in diamonds with light brown and white squares, similar to an argyle vest, which is traditionally associated with academia. His green bowtie further alludes to his academic nature.
</div>
<div>
Blathers is an owl with brown feathers. His face is white and he has a yellow beak. His arms are wing shaped and he has yellow talons. His eyes are very big with small black irises. He also has big pink cheek circles on his cheeks. His belly appears to be checkered in diamonds with light brown and white squares, similar to an argyle vest, which is traditionally associated with academia. His green bowtie further alludes to his academic nature.
</div>
2020-06-02 09:50:32 +03:00
</div>
2020-06-04 11:31:47 +03:00
</div>
2020-06-02 09:50:32 +03:00
2020-06-04 11:31:47 +03:00
<!-- RIGHT CONTAINER SIDE-->
<div class="flex main-cols right-col">
2020-06-04 13:15:27 +03:00
2020-06-15 09:12:58 +03:00
<div id="chat-container" class="bg-gray-800">
2020-06-04 11:31:47 +03:00
<div id="messages-container">
<div v-for="(message, index) in messages">
2020-06-10 00:12:50 +03:00
<div class="message flex">
2020-06-04 11:31:47 +03:00
<img
v-bind:src="message.image"
2020-06-15 09:12:58 +03:00
class="message-avatar rounded-full bg-black bg-opacity-50"
v-bind:style="{ backgroundColor: message.userColor() }"
2020-06-04 11:31:47 +03:00
/>
2020-06-10 00:12:50 +03:00
<div class="message-content">
2020-06-15 09:12:58 +03:00
<p class="message-author text-white font-bold">{{ message.author }}</p>
<p class="message-text text-gray-400 font-thin " v-html="message.formatText()"></p>
2020-06-04 11:31:47 +03:00
</div>
</div>
</div>
</div>
2020-06-04 11:31:47 +03:00
2020-06-15 09:12:58 +03:00
<div id="message-input-container" class="shadow-md bg-gray-900 border-t border-gray-700 border-solid">
2020-06-14 10:24:26 +03:00
<form id="message-form" class="flex" /*@submit="submitChatForm"*/>
2020-06-14 06:15:31 +03:00
<input type="hidden" name="inputAuthor" id="self-message-author" v-model="message.author" />
2020-06-04 13:15:27 +03:00
<textarea
2020-06-14 10:24:26 +03:00
id="message-body-form"
2020-06-04 13:15:27 +03:00
placeholder="Message"
v-model="message.body"
2020-06-14 10:24:26 +03:00
class="appearance-none block w-full bg-gray-200 text-gray-700 border border-black-500 rounded py-2 px-2 my-2 focus:bg-white"
2020-06-14 06:15:31 +03:00
></textarea>
2020-06-04 13:15:27 +03:00
2020-06-14 06:15:31 +03:00
<div id="message-form-actions" class="flex">
2020-06-15 09:12:58 +03:00
<span id="message-form-warning" class="text-red-600 text-xs"></span>
2020-06-14 06:15:31 +03:00
<button
2020-06-14 10:24:26 +03:00
id="button-submit-message"
2020-06-14 06:15:31 +03:00
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-1 px-2 rounded"
> Send
</button>
</div>
2020-06-04 13:15:27 +03:00
</form>
</div>
2020-06-02 09:50:32 +03:00
</div>
2020-06-04 11:31:47 +03:00
</div>
</div>
2020-06-02 09:50:32 +03:00
</div>
2020-05-24 03:57:49 +03:00
<script src="js/usercolors.js"></script>
2020-06-15 01:18:43 +03:00
<script src="js/config.js"></script>
2020-06-14 09:38:09 +03:00
<script src="js/utils.js"></script>
2020-06-04 11:31:47 +03:00
<script src="js/message.js"></script>
<script src="js/app.js"></script>
</body>
</html>