import type { Meta, StoryObj } from '@storybook/react'; import { VideoPlayer } from './VideoPlayer'; const meta: Meta = { title: 'Media/VideoPlayer', component: VideoPlayer, parameters: { layout: 'fullscreen', }, }; export default meta; type Story = StoryObj; export const Default: Story = { args: { src: 'https://www.w3schools.com/html/mov_bbb.mp4', title: 'Big Buck Bunny', poster: 'https://peach.blender.org/wp-content/uploads/title_anouncement.jpg?x11217', }, render: args => (
), }; export const AutoPlay: Story = { args: { src: 'https://www.w3schools.com/html/mov_bbb.mp4', title: 'Auto Playing Video', autoPlay: true, }, render: args => (
), }; export const NoPoster: Story = { args: { src: 'https://www.w3schools.com/html/mov_bbb.mp4', title: 'Video Without Poster', }, render: args => (
), }; export const NoAutoFloat: Story = { args: { src: 'https://www.w3schools.com/html/mov_bbb.mp4', title: 'Video Without Auto-Float', enableAutoFloat: false, }, render: args => (

Auto-float disabled via `enableAutoFloat={false}`.

Scroll more...

Keep scrolling - the player will NOT float.

), }; export const AutoFloat: Story = { args: { src: 'https://www.w3schools.com/html/mov_bbb.mp4', title: 'Floating Demo - Scroll to see it float', }, render: args => (

Play the video and scroll down. The player will float to the corner automatically!

Scroll more...

Keep scrolling to trigger the floating behavior.

), };