mirror of
https://github.com/owncast/owncast.git
synced 2024-11-28 19:19:06 +03:00
32 lines
813 B
TypeScript
32 lines
813 B
TypeScript
import React from 'react';
|
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
import OwncastPlayer from '../components/video/OwncastPlayer';
|
|
|
|
const streams = {
|
|
DemoServer: `https://watch.owncast.online`,
|
|
RetroStrangeTV: `https://live.retrostrange.com`,
|
|
localhost: `http://localhost:8080`,
|
|
};
|
|
|
|
export default {
|
|
title: 'owncast/Player',
|
|
component: OwncastPlayer,
|
|
argTypes: {
|
|
source: {
|
|
options: Object.keys(streams),
|
|
mapping: streams,
|
|
control: {
|
|
type: 'select',
|
|
},
|
|
},
|
|
},
|
|
parameters: {},
|
|
} as ComponentMeta<typeof OwncastPlayer>;
|
|
|
|
const Template: ComponentStory<typeof OwncastPlayer> = args => <OwncastPlayer {...args} />;
|
|
|
|
export const LiveDemo = Template.bind({});
|
|
LiveDemo.args = {
|
|
online: true,
|
|
source: 'https://watch.owncast.online',
|
|
};
|