Support for dynamic page loading for Multi-WACZs (#399)

Support querying pages dynamically via pages endpoint:
- If loaded pages < total pages, load additional pages via /pages
endpoint if canQueryPages is set to true on item
- If query provided, do `/pages?search=...` to search for pages. Use
pagination of 25 pages for now.

WACZ hash:
- if provided, store waczhash per page, and use for thumbnail, favicon
and top-level replay loading.

Embed: better support for force reloading, call delete with reload
directly in embed

Depends on webrecorder/wabac.js#220
This commit is contained in:
Ilya Kreymer
2025-02-24 14:35:03 -08:00
committed by GitHub
parent 94cbf5e43d
commit 6ef8bf4973
9 changed files with 203 additions and 66 deletions
+6 -1
View File
@@ -20,6 +20,9 @@ class Replay extends LitElement {
@property({ type: String })
ts = "";
@property({ type: String })
waczhash = "";
// actual replay url
@property({ type: String })
replayUrl = "";
@@ -97,7 +100,9 @@ class Replay extends LitElement {
doSetIframeUrl() {
this.iframeUrl =
this.url && this.collInfo
? `${this.collInfo.replayPrefix}/${this.ts || ""}mp_/${this.url}`
? `${this.collInfo.replayPrefix}/${
this.waczhash ? `:${this.waczhash}/` : ""
}${this.ts || ""}mp_/${this.url}`
: "";
}