Skip to content

Commit

Permalink
Video upload feature
Browse files Browse the repository at this point in the history
And you can play video as soon as upload starts! This is pretty useful for thicc ones. Video will be keeped in cache and will comply cache size limit.

I'm also implemented system storage check to change cache limit if it's lower than config value, so upload will be blocked if there is lower than 10MiB available on disk.
  • Loading branch information
RblSb committed Jan 28, 2025
1 parent c7518e5 commit 0592564
Show file tree
Hide file tree
Showing 19 changed files with 1,678 additions and 711 deletions.
1,488 changes: 915 additions & 573 deletions build/server.js

Large diffs are not rendered by default.

194 changes: 174 additions & 20 deletions res/client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 22 additions & 2 deletions res/css/des.css
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ header h4 {
background: var(--background-video);
}

.info {
.video-info {
order: 2;
}

Expand Down Expand Up @@ -480,6 +480,8 @@ iframe#videoplayer {
/* Playlist */

#playlist {
display: flex;
flex-direction: column;
border-top: .063rem solid;
border-color: var(--border);
}
Expand Down Expand Up @@ -527,8 +529,25 @@ iframe#videoplayer {
flex-grow: 1;
}

#mediaurl {
.mediaurl-wrap {
display: flex;
flex-grow: 2;
position: relative;
}

#mediaurl {
display: flex;
flex: 1;
padding-right: 2rem;
}

#mediaurl-upload {
display: flex;
position: absolute;
right: 0.1rem;
top: 50%;
transform: translateY(-50%);
background: transparent;
}

#customembed>*>input,
Expand Down Expand Up @@ -682,6 +701,7 @@ footer#footer {
}

#userlisttoggle {
padding: 0;
overflow: hidden;
white-space: nowrap;
text-align: left;
Expand Down
13 changes: 9 additions & 4 deletions res/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<section id="player">
<div id="ytapiplayer" class="embed-responsive"></div>
<!-- Video info -->
<div class="info">
<header id="header">
<div class="info video-info">
<header>
<h2 id="currenttitle">${nothingPlaying}</h2>
</header>
<!-- Video controls -->
Expand All @@ -44,7 +44,7 @@ <h2 id="currenttitle">${nothingPlaying}</h2>
<!-- Playlist -->
<section id="playlist">
<!-- Playlist info -->
<div class="info">
<div class="info playlist-info">
<header>
<h3>${playlist}</h3>
<button id="lockplaylist" title="${playlistOpen}">
Expand Down Expand Up @@ -88,7 +88,12 @@ <h3>${playlist}</h3>
<button id="insert_template" title="${addTemplateUrl}">
<div>&gt;</div>
</button>
<input id="mediaurl" type="text" placeholder="${addVideoFromUrl}">
<div class="mediaurl-wrap">
<input id="mediaurl" type="text" placeholder="${addVideoFromUrl}">
<button id="mediaurl-upload">
<ion-icon name="cloud-upload"></ion-icon>
</button>
</div>
</div>
<div id="mediatitleblock" class="display-flex" style="display: none;">
<input id="mediatitle" type="text" placeholder="${optionalTitle}">
Expand Down
Loading

0 comments on commit 0592564

Please sign in to comment.