owncast/web/stories/Video.stories.tsx

33 lines
813 B
TypeScript
Raw Normal View History

2022-04-26 23:39:35 +03:00
import React from 'react';
import { ComponentStory, ComponentMeta } from '@storybook/react';
import OwncastPlayer from '../components/video/OwncastPlayer';
2022-04-27 05:29:13 +03:00
const streams = {
DemoServer: `https://watch.owncast.online`,
RetroStrangeTV: `https://live.retrostrange.com`,
localhost: `http://localhost:8080`,
};
2022-04-26 23:39:35 +03:00
export default {
2022-04-27 05:29:13 +03:00
title: 'owncast/Player',
component: OwncastPlayer,
argTypes: {
source: {
options: Object.keys(streams),
mapping: streams,
control: {
type: 'select',
},
},
},
2022-04-26 23:39:35 +03:00
parameters: {},
2022-04-27 05:29:13 +03:00
} as ComponentMeta<typeof OwncastPlayer>;
2022-04-26 23:39:35 +03:00
2022-04-27 05:29:13 +03:00
const Template: ComponentStory<typeof OwncastPlayer> = args => <OwncastPlayer {...args} />;
2022-04-26 23:39:35 +03:00
2022-04-27 05:29:13 +03:00
export const LiveDemo = Template.bind({});
LiveDemo.args = {
online: true,
source: 'https://watch.owncast.online',
};