Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

svelte-react-player

Svelte wrapper for react-player

svelte, react-player, video, embed

readme

NPM

svelte-react-player

Wrapper for the standalone version of react-player.

Documentation & Demo

Installation

npm i svelte-react-player

Enjoy:

<script>
    import { Player } from 'svelte-react-player'
</script>

<Player url="https://www.youtube.com/watch?v=NduTgkntfT4" />

Props

Prop Description Default
url Video URL ''
fluid Toggle fluid container false
config Object of react-player props {}

Development

npm run dev will start a local dev server on localhost:5000

Navigate to http://localhost:5000/svelte-react-player to see the docs.

Thanks to @svelte-docs!