diff --git a/html/poketube.ejs b/html/poketube.ejs
index 27a56ce1..cdc690f2 100644
--- a/html/poketube.ejs
+++ b/html/poketube.ejs
@@ -589,8 +589,258 @@ background-color: #0000;
position: sticky;
background:#0009;
top: 0;
+
}
+ #controls {
+ display: flex;
+ visibility: hidden;
+ position: absolute;
+ bottom: 0;
+ margin-bottom: 70px !important;
+ margin: 0 20px;
+ width: 100%;
+ align-items:flex-end;
+ }
+ video:hover~#controls, #controls:hover {
+ visibility: visible;
+ }
+ .control-button {
+ width: 40px;
+ border-radius: 5px;
+ margin-bottom: 6px;
+ padding: 3px
+ }
+ .video-player-container {
+ position: relative;
+ }
+ .control-button svg {
+ fill: #c59cd0;
+ width: 40px;
+ margin-bottom: -6px;
+ }
+ #seekbar {
+ display: flex;
+ margin-left: 20px;
+ margin-right: 20px;
+ width: 100%;
+ }
+ input[id*="-slider"] {
+ flex-grow: 1;
+ -webkit-appearance: none;
+ appearance: none;
+ background: #ffffff;
+ border: 1px solid #000000;
+ margin-bottom: 23px;
+ cursor: pointer;
+ width: 0.5rem;
+ height: 5px !important;
+ display: block;
+ border-radius: 50px;
+ }
+ input[type=range]::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ border: 1px solid #000000;
+ height: 21px;
+ width: 21px;
+ border-radius: 20px;
+ background: var(--div-gradient);
+ cursor: pointer;
+ box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
+ }
+ input[type=range]::-moz-range-thumb {
+ border: 1px solid #000000;
+ height: 21px;
+ width: 21px;
+ border-radius: 20px;
+ background: var(--div-gradient);
+ cursor: pointer;
+ box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
+ }
+ #timestamps {
+ margin-right: 40px;
+ }
+ html:fullscreen video {
+ display: block !important;
+ position: fixed !important;
+ top: 0 !important;
+ left: 0 !important;
+ width: 100vw !important;
+ height: 100vh !important;
+ z-index: 999999 !important;
+ }
+ html:fullscreen *:not(html, video, body, ptd-app-ejs, .app, .watch-page, .primary, .video-player-container, #popupMenu, #popupMenu *) {
+ visibility: hidden !important;
+ }
+
+
<% if(shortsui) { %>
+
+
+
<% if(secure) { %>
<% if(!dnt_val) { %>
@@ -2401,7 +2684,7 @@ a {
-
+
<% } %>
@@ -3402,13 +3685,17 @@ if (userID) {
// Optionally, you can set a default href or display an error message.
}
-
+const aud = document.getElementById("aud");
+const vid = document.getElementById("video");
// Save and resume video progress
const videoId = new URLSearchParams(window.location.search).get('v');
const localStorageKey = `progress-${videoId}`;
+
+
function saveProgress() {
+ console.log(`Saved progress @ ${video.currentTime}`)
localStorage.setItem(localStorageKey, video.currentTime);
}
@@ -3419,7 +3706,8 @@ function removeProgress() {
function resumeProgress() {
const progress = localStorage.getItem(localStorageKey);
if (progress) {
- video.currentTime = progress;
+ aud.currentTime = progress;
+ vid.currentTime = progress;
}
}
@@ -3430,6 +3718,7 @@ function resumeProgress() {
video.addEventListener('timeupdate', () => {
if (Math.floor(video.currentTime) % 1 === 0) {
+
saveProgress();
}
});
@@ -3437,10 +3726,8 @@ video.addEventListener('timeupdate', () => {
video.addEventListener('ended', () => {
removeProgress();
});
-
-window.addEventListener('load', () => {
- resumeProgress();
-});
+window.addEventListener('DOMContentLoaded', () => {
+ throw 1;
@@ -3457,6 +3744,7 @@ window.addEventListener('load', () => {
<% if (!optout) { %>
<% } %>
+