|
1 | | -<div id="panel" phx-hook="Panel" class="p-10"> |
2 | | - <h1>WHIP Player</h1> |
3 | | - <div> |
4 | | - <div class="p-2"> |
5 | | - <label for="audioDevices">Audio Input Device:</label> |
6 | | - <select id="audioDevices"></select> |
| 1 | +<div id="panel" phx-hook="Panel" class="h-full flex justify-between"> |
| 2 | + <div class="flex flex-col gap-6"> |
| 3 | + <div class="flex gap-6"> |
| 4 | + <div> |
| 5 | + <label for="audioDevices" class="font-semibold text-brand/100">Audio Device</label> |
| 6 | + <select id="audioDevices" class="border-brand/50 text-brand/90 rounded-xl"></select> |
| 7 | + </div> |
| 8 | + <div> |
| 9 | + <label for="videoDevices" class="font-semibold text-brand/100">Video Device</label> |
| 10 | + <select id="videoDevices" class="border-brand/50 text-brand/90 rounded-xl"></select> |
| 11 | + </div> |
7 | 12 | </div> |
8 | | - <div class="p-2"> |
9 | | - <label for="videoDevices">Video Input Device:</label> |
10 | | - <select id="videoDevices"></select> |
| 13 | + <div class="flex flex-col gap-2"> |
| 14 | + <p class="font-semibold text-brand/100">Max bitrate (kbps)</p> |
| 15 | + <div class="flex gap-6"> |
| 16 | + <div> |
| 17 | + <label for="highVideoBitrate" class="font-semibold text-brand/100">High</label> |
| 18 | + <input |
| 19 | + type="text" |
| 20 | + id="highVideoBitrate" |
| 21 | + value="1500" |
| 22 | + class="border-brand/50 text-brand/90 rounded-xl" |
| 23 | + /> |
| 24 | + </div> |
| 25 | + <div> |
| 26 | + <label for="mediumVideoBitrate" class="font-semibold text-brand/100">Medium</label> |
| 27 | + <input |
| 28 | + type="text" |
| 29 | + id="mediumVideoBitrate" |
| 30 | + value="600" |
| 31 | + class="border-brand/50 text-brand/90 rounded-xl" |
| 32 | + /> |
| 33 | + </div> |
| 34 | + <div> |
| 35 | + <label for="lowVideoBitrate" class="font-semibold text-brand/100">Low</label> |
| 36 | + <input |
| 37 | + type="text" |
| 38 | + id="lowVideoBitrate" |
| 39 | + value="200" |
| 40 | + class="border-brand/50 text-brand/90 rounded-xl" |
| 41 | + /> |
| 42 | + </div> |
| 43 | + </div> |
11 | 44 | </div> |
12 | | - <div class="p-2"> |
13 | | - <label for="highVideoBitrate">Max Video Bitrate (high, kbps):</label> |
14 | | - <input type="text" id="highVideoBitrate" value="1500" /> |
15 | | - <label for="mediumVideoBitrate">Max Video Bitrate (medium, kbps):</label> |
16 | | - <input type="text" id="mediumVideoBitrate" value="600" /> |
17 | | - <label for="lowVideoBitrate">Max Video Bitrate (low, kbps):</label> |
18 | | - <input type="text" id="lowVideoBitrate" value="200" /> |
| 45 | + <div class="flex gap-6 justify-items"> |
| 46 | + <div> |
| 47 | + <label for="serverUrl" class="font-semibold text-brand/100">Server URL</label> |
| 48 | + <input type="text" id="serverUrl" class="border-brand/50 text-brand/90 rounded-xl" /> |
| 49 | + </div> |
| 50 | + <div> |
| 51 | + <label for="serverToken" class="font-semibold text-brand/100"> Server Token</label> |
| 52 | + <input type="password" id="serverToken" class="border-brand/50 text-brand/90 rounded-xl" /> |
| 53 | + </div> |
19 | 54 | </div> |
20 | | - <div class="p-2"> |
21 | | - <label for="serverUrl">Server URL</label> |
22 | | - <input type="text" id="serverUrl" /> |
| 55 | + <div> |
| 56 | + <button |
| 57 | + id="button" |
| 58 | + class="rounded-lg bg-brand/10 px-2 py-1 hover:bg-brand/20 text-brand/80 font-bold" |
| 59 | + > |
| 60 | + Start streaming |
| 61 | + </button> |
23 | 62 | </div> |
24 | | - <div class="p-2"> |
25 | | - <label for="serverToken"> Server Token </label> |
26 | | - <input type="password" id="serverToken" /> |
27 | | - </div> |
28 | | - <div class="p-2"> |
29 | | - <button id="button">Start streaming</button> |
30 | | - </div> |
31 | | - <div class="p-2"> |
32 | | - <h3>Preview</h3> |
33 | | - <video id="previewPlayer" controls autoplay muted></video> |
| 63 | + <div id="videoplayer-wrapper" class="flex-1 min-h-0"> |
| 64 | + <video id="previewPlayer" class="m-auto rounded-xl bg-black h-full" autoplay controls muted> |
| 65 | + </video> |
34 | 66 | </div> |
35 | 67 | </div> |
36 | 68 | <div |
37 | 69 | id="chat" |
38 | | - class="hidden lg:flex flex-col overflow-hidden justify-end h-full text-wrap break-words w-96 p-4 border-brand/50 border-2 rounded-xl" |
| 70 | + class="flex flex-col overflow-hidden justify-end h-full text-wrap break-words w-96 p-4 border-brand/50 border-2 rounded-xl" |
39 | 71 | > |
40 | 72 | <div id="chat-messages" class="overflow-y-scroll justify-end"></div> |
41 | 73 | </div> |
|
0 commit comments