Fallback Poster
Background poster image for HTML Media Element
Installation
npx shadcn add @limeplay/fallback-posterSetup the fallback poster in player layout
import { FallbackPoster } from "@/components/limeplay/fallback-poster"
import { LimeplayLogo } from "@/components/limeplay/limeplay-logo"
export function MediaPlayer() {
return (
<MediaProvider>
<PlayerHooks />
<Layout.RootContainer height={720} width={1280}>
<FallbackPoster>
<LimeplayLogo />
</FallbackPoster>
<Layout.PlayerContainer>
<MediaElement />
</Layout.PlayerContainer>
</Layout.RootContainer>
</MediaProvider>
)
}Understanding
This poster element wraps the player layout and serves two common use cases:
- Acts as a cover image for the player when in Picture-in-Picture (PiP) mode to remove the native black overlay (inspired by Prime Video).
- Provides a skeleton while the HTML media element loads; it will render fallback content while the media is mounting.