fix: paid video preview plays in lightbox, better error messages
All checks were successful
Build Archipelago ISO (dev) / build-iso (push) Successful in 11m8s

Video thumbnail in card is pointer-events-none so clicks pass through
to the play handler. Better error messages when preview fetch fails.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-04-11 23:59:55 -04:00
parent fcd7335dcf
commit 52f35d25f1

View File

@@ -89,7 +89,7 @@
<video
v-else-if="item.mime_type.startsWith('video/') && previewUrls[item.id]"
:src="previewUrls[item.id]"
class="w-full h-full object-cover"
class="w-full h-full object-cover pointer-events-none"
muted
autoplay
loop
@@ -535,9 +535,11 @@ async function playMedia(item: CatalogItem) {
videoPlayerUrl.value = blobUrl
videoPlayerPaid.value = paid
}
} else {
purchaseError.value = 'No preview data returned — peer may be offline'
}
} catch {
purchaseError.value = 'Failed to load media for playback'
} catch (e: unknown) {
purchaseError.value = e instanceof Error ? e.message : 'Failed to load media — peer may be offline'
} finally {
playing.value = null
}