fix: paid video preview plays in lightbox, better error messages
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user