Fix: Hide resume/progress bar when near end of video

Co-authored-by: mathieumoran1 <[email protected]>
This commit is contained in:
Cursor Agent
2025-12-23 00:50:15 +00:00
co-authored by mathieumoran1
parent 65573bf0eb
commit 2508843153
+4
View File
@@ -423,6 +423,9 @@ window.addEventListener('DOMContentLoaded', async function () {
if (time > 1) { if (time > 1) {
if (duration && Number.isFinite(duration) && duration > 0) { if (duration && Number.isFinite(duration) && duration > 0) {
const pct = Math.max(0, Math.min(100, (time / duration) * 100)); const pct = Math.max(0, Math.min(100, (time / duration) * 100));
// Hide "resume/progress" once we're basically at the credits.
// Backend uses 95% as the "credit roll" threshold too.
if (pct < 95) {
progressHtml = ` progressHtml = `
<div class="mt-2"> <div class="mt-2">
<div class="d-flex justify-content-between align-items-center text-muted small"> <div class="d-flex justify-content-between align-items-center text-muted small">
@@ -434,6 +437,7 @@ window.addEventListener('DOMContentLoaded', async function () {
</div> </div>
</div> </div>
`; `;
}
} else { } else {
progressHtml = ` progressHtml = `
<div class="mt-2 text-muted small"> <div class="mt-2 text-muted small">