owncast/web/stories/Video.stories.tsx

33 lines
813 B
TypeScript
Raw Normal View History

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