Easy, dependency free embeds for Svelte and Vue.
# npm
npm install @embedz/svelte
# pnpm
pnpm install @embedz/svelte
# yarn
yarn add @embedz/svelte
<script>
import { Dailymotion, Vimeo, YouTube } from "@embedz/svelte";
</script>
<YouTube
id="C7eGZUBdL4g"
posterquality="max"
/>
type: string
<YouTube id="C7eGZUBdL4g" />
You can also pass in the full URL for the video
<YouTube id="https://youtu.be/C7eGZUBdL4g" />
type: string
<YouTube
id="C7eGZUBdL4g"
poster="https://picsum.photos/1280/720"
/>
type: "max" | "high" | "default" | "low"
default: "default"
<YouTube
id="C7eGZUBdL4g"
posterquality="low"
/>
type: string
<YouTube
id="C7eGZUBdL4g"
params="controls=0&mute=1"
/>
type: string
<YouTube
id="C7eGZUBdL4g"
ratio="4:3"
/>
type: string
<YouTube
id="C7eGZUBdL4g"
title="Rock the House"
/>
type: string
<Vimeo id="32001208" />
You can also pass in the full URL for the video
<Vimeo id="https://vimeo.com/32001208" />
type: string
<Vimeo
id="32001208"
poster="https://picsum.photos/1280/720"
/>
type: "max" | "high" | "default" | "low"
default: "default"
<Vimeo
id="32001208"
posterquality="low"
/>
type: string
<Vimeo
id="32001208"
params="controls=0&mute=1"
/>
type: string
<Vimeo
id="32001208"
ratio="4:3"
/>
type: string
<Vimeo
id="32001208"
title="Earth"
/>
type: string
<Dailymotion id="x8e31lf" />
You can also pass in the full URL for the video
<Dailymotion id="https://dai.ly/x8e31lf" />
type: string
<Dailymotion
id="x8e31lf"
poster="https://picsum.photos/1280/720"
/>
type: "max" | "high" | "default" | "low"
default: "default"
<Dailymotion
id="x8e31lf"
posterquality="low"
/>
type: string
<Dailymotion
id="x8e31lf"
params="mute=true&loop=false"
/>
type: string
<Dailymotion
id="x8e31lf"
ratio="4:3"
/>
type: string
<Dailymotion
id="x8e31lf"
title="Dolby Vision"
/>
git clone https://github.com/embedz/embedz.git
cd embedz/packages/svelte
npm install
npm run dev -- --open
Licensed under the MIT license.
Contributions are welcome! Please feel free to submit a Pull Request.