Media Element
Native HTML Media Element (Audio | Video) mounted to store
Installation
npx shadcn add @limeplay/mediaSetup the provider in the root
import { Media } from "@/components/limeplay/media"
// ... other imports
export function MediaPlayer() {
return (
<MediaProvider>
<PlayerHooks />
<Suspense>
<Layout.RootContainer height={720} width={1280}>
<Media
as="video"
autoPlay={true}
className="size-full object-cover"
muted
/>
</Layout.RootContainer>
</Suspense>
</MediaProvider>
)
}Understanding
Native HTML Media Element component that provides audio and video playback capabilities. It supports both video and audio elements via the as prop.
Components
Media
The main component that renders either a <video> or <audio> element based on the as prop.
API Reference
Prop
Type