0
owncast/web/components/video/OwncastPlayer/OwncastPlayer.stories.tsx
kame 4f078e1ee4
Migrated Storybook notation from CSF2 to CSF3 (#3412)
* Migrate web action-buttons directory to CSF3 notation

* Migrate web chat directory to CSF3 notation

* Migrate web common directory to CSF3 notation

* Migrate web layout directory to CSF3 notation

* Migrate web modals directory to CSF3 notation

* Migrate web ui directory to CSF3 notation

* Migrate web video directory to CSF3 notation

* Migrate web stories directory to CSF3 notation
2023-11-06 19:35:05 -08:00

43 lines
946 B
TypeScript

import { StoryFn, Meta } from '@storybook/react';
import { RecoilRoot } from 'recoil';
import { OwncastPlayer } from './OwncastPlayer';
const streams = {
DemoServer: `https://watch.owncast.online/hls/stream.m3u8`,
RetroStrangeTV: `https://live.retrostrange.com/hls/stream.m3u8`,
localhost: `http://localhost:8080/hls/stream.m3u8`,
};
const meta = {
title: 'owncast/Player/Player',
component: OwncastPlayer,
argTypes: {
source: {
options: Object.keys(streams),
mapping: streams,
control: {
type: 'select',
},
},
},
parameters: {},
} satisfies Meta<typeof OwncastPlayer>;
export default meta;
const Template: StoryFn<typeof OwncastPlayer> = args => (
<RecoilRoot>
<OwncastPlayer {...args} />
</RecoilRoot>
);
export const LiveDemo = {
render: Template,
args: {
online: true,
source: 'https://watch.owncast.online/hls/stream.m3u8',
title: 'Stream title',
},
};