@seshuk/payload-plugin-media-preview plugin together with the Bunny Stream adapter this plugin ships.
This plugin exports a ready-made adapter at @seshuk/payload-storage-bunny/media-preview. It resolves any document whose bunnyData.stream carries a videoId and libraryId to Bunny Stream’s iframe embed player, so Stream videos preview inline with no extra wiring.
Install
The media-preview plugin is an optional peer — install it alongside this plugin:Wire it up
Register the media-preview plugin afterbunnyStorage, passing the Bunny Stream adapter:
payload.config.ts
How it resolves
- Only
video/*andaudio/*documents are handled; anything else falls through to the media-preview plugin’s other adapters and built-in viewers. - The document must have
bunnyData.stream.videoIdandlibraryId— i.e. it was uploaded to Bunny Stream. Files still encoding, or non-Stream files, are skipped. - It renders an inline iframe using Bunny Stream’s embed player (
iframe.mediadelivery.net); nothing is proxied through your server.
@seshuk/payload-plugin-media-preview docs for previewing other file types (images, documents), per-collection adapters, and field placement.