import { ComponentMeta, ComponentStory } from '@storybook/react';
const Template = ({
origin,
query,
title,
width,
height,
}: {
origin: string;
query: string;
title: string;
width: number;
height: number;
}) => (
);
const origins = {
DemoServer: `https://watch.owncast.online`,
RetroStrangeTV: `https://live.retrostrange.com`,
localhost: `http://localhost:3000`,
};
export default {
title: 'owncast/Player/Embeds',
component: Template,
argTypes: {
origin: {
options: Object.keys(origins),
mapping: origins,
control: {
type: 'select',
},
defaultValue: origins.DemoServer,
},
query: {
type: 'string',
},
title: {
defaultValue: 'My Title',
type: 'string',
},
height: {
defaultValue: 350,
type: 'number',
},
width: {
defaultValue: 550,
type: 'number',
},
},
} satisfies ComponentMeta;
export const Default: ComponentStory = Template.bind({});
Default.args = {};
export const InitiallyMuted: ComponentStory = Template.bind({});
InitiallyMuted.args = {
query: 'initiallyMuted=true',
};