aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/video-app.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/video-app.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/video-app.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/video-app.js b/packages/meshbay-hub/src/meshbay_hub/static/video-app.js
index ece95ea..de61839 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/video-app.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/video-app.js
@@ -144,7 +144,7 @@ function LazyTile({ cls = 'video-tile-slot', children }) {
const _thumbBlobCache = new Map();
function MediaThumb({
- thumbHash, transportRef, gekRef, alt, cls = 'video-thumb', onReady,
+ thumbHash, transportRef, gekRef, alt, cls = 'video-thumb', onReady, emptyIcon = 'video',
}) {
const [blobUrl, setBlobUrl] = useState(() => _thumbBlobCache.get(thumbHash) || null);
@@ -183,7 +183,7 @@ function MediaThumb({
return () => { cancelled = true; };
}, [thumbHash]);
- if (!blobUrl) return html`<div class="${cls} video-thumb-empty"><${Icon} name="video" /></div>`;
+ if (!blobUrl) return html`<div class="${cls} video-thumb-empty"><${Icon} name=${emptyIcon} /></div>`;
return html`<img class=${cls} src=${blobUrl} alt=${alt || ''} loading="lazy" />`;
}
@@ -813,4 +813,9 @@ function VideoApp({
`;
}
-export { VideoApp };
+// MediaThumb and LazyTile are also used by music-app.js (docs/musicbay.md
+// §7.1): the same "decrypt a thumb_hash via the chunk path into a cached
+// blob" and "mount only once actually scrolled near" mechanisms apply to a
+// track's cover art unchanged, so Music imports them here rather than
+// re-implementing (apps.md §4's checklist).
+export { VideoApp, MediaThumb, LazyTile };