Skip to main content
Show inline Bunny Stream video and audio previews in the Payload admin — the player embedded right on the document — using the standalone @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 after bunnyStorage, passing the Bunny Stream adapter:
payload.config.ts

How it resolves

  • Only video/* and audio/* 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.videoId and libraryId — 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.
See the @seshuk/payload-plugin-media-preview docs for previewing other file types (images, documents), per-collection adapters, and field placement.