Update stable review page backend (2026-08-18T17:19:33+00:00)
Browse files- index.html +16 -2
index.html
CHANGED
|
@@ -46,7 +46,9 @@ window.WORLDMODELBENCH_CATALOG=[{"id":"egoexo_046e161aeadc441388ce870b9e379441_e
|
|
| 46 |
textarea { min-height: 82px; resize: vertical; line-height: 1.4; }
|
| 47 |
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
|
| 48 |
.review-card { border: 1px solid #c8d3cd; border-radius: 7px; overflow: clip; background: #fff; min-width: 0; }
|
| 49 |
-
|
|
|
|
|
|
|
| 50 |
.card-body { padding: 14px; }
|
| 51 |
.sample-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
|
| 52 |
.sample-heading h3 { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
|
|
@@ -499,6 +501,18 @@ window.WORLDMODELBENCH_CATALOG=[{"id":"egoexo_046e161aeadc441388ce870b9e379441_e
|
|
| 499 |
if (event.key !== " " && event.key !== "Enter") return;
|
| 500 |
startVideo(event);
|
| 501 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 502 |
video.addEventListener("error", () => {
|
| 503 |
video.title = "Video failed to load; copy the path below to open the original on Hugging Face";
|
| 504 |
});
|
|
@@ -513,7 +527,7 @@ window.WORLDMODELBENCH_CATALOG=[{"id":"egoexo_046e161aeadc441388ce870b9e379441_e
|
|
| 513 |
const submitButton = el("button", { className: "button primary", "data-submit-button": "", type: "button", text: state.serviceOnline ? "Submit shared annotation" : "Save this annotation", onClick: event => submitCard(item, card, event.currentTarget) });
|
| 514 |
const submitted = draftFor(item).submittedAt ? "Submitted" : draftFor(item).autosavedAt ? "Saved to cloud" : draftFor(item).localSavedAt ? "Saved locally" : "Local draft";
|
| 515 |
body.append(fieldGrid, el("div", { className: "submit-row" }, [submitButton, el("span", { className: `submit-state ${draftFor(item).submittedAt ? "success" : ""}`, text: submitted })]), el("p", { className: "metadata", text: item.videoPath }));
|
| 516 |
-
card.append(
|
| 517 |
return card;
|
| 518 |
}
|
| 519 |
function jumpToPage(value, pages) {
|
|
|
|
| 46 |
textarea { min-height: 82px; resize: vertical; line-height: 1.4; }
|
| 47 |
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
|
| 48 |
.review-card { border: 1px solid #c8d3cd; border-radius: 7px; overflow: clip; background: #fff; min-width: 0; }
|
| 49 |
+
.media-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #101713; }
|
| 50 |
+
.media-frame video { display: block; width: 100%; height: 100%; background: #101713; object-fit: contain; }
|
| 51 |
+
.video-poster-overlay { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; pointer-events: none; background: #101713; }
|
| 52 |
.card-body { padding: 14px; }
|
| 53 |
.sample-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
|
| 54 |
.sample-heading h3 { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
|
|
|
|
| 501 |
if (event.key !== " " && event.key !== "Enter") return;
|
| 502 |
startVideo(event);
|
| 503 |
});
|
| 504 |
+
const mediaFrame = el("div", { className: "media-frame" });
|
| 505 |
+
const posterUrl = item.initialFrameUrl ? reviewAssetUrl("preview", item) : "";
|
| 506 |
+
const posterOverlay = posterUrl ? el("img", { className: "video-poster-overlay", src: posterUrl, alt: "" }) : null;
|
| 507 |
+
if (posterOverlay) {
|
| 508 |
+
const hidePoster = () => posterOverlay.classList.add("hidden");
|
| 509 |
+
video.addEventListener("loadeddata", hidePoster);
|
| 510 |
+
video.addEventListener("playing", hidePoster);
|
| 511 |
+
video.addEventListener("error", () => posterOverlay.classList.remove("hidden"));
|
| 512 |
+
mediaFrame.append(video, posterOverlay);
|
| 513 |
+
} else {
|
| 514 |
+
mediaFrame.append(video);
|
| 515 |
+
}
|
| 516 |
video.addEventListener("error", () => {
|
| 517 |
video.title = "Video failed to load; copy the path below to open the original on Hugging Face";
|
| 518 |
});
|
|
|
|
| 527 |
const submitButton = el("button", { className: "button primary", "data-submit-button": "", type: "button", text: state.serviceOnline ? "Submit shared annotation" : "Save this annotation", onClick: event => submitCard(item, card, event.currentTarget) });
|
| 528 |
const submitted = draftFor(item).submittedAt ? "Submitted" : draftFor(item).autosavedAt ? "Saved to cloud" : draftFor(item).localSavedAt ? "Saved locally" : "Local draft";
|
| 529 |
body.append(fieldGrid, el("div", { className: "submit-row" }, [submitButton, el("span", { className: `submit-state ${draftFor(item).submittedAt ? "success" : ""}`, text: submitted })]), el("p", { className: "metadata", text: item.videoPath }));
|
| 530 |
+
card.append(mediaFrame, body);
|
| 531 |
return card;
|
| 532 |
}
|
| 533 |
function jumpToPage(value, pages) {
|