youplayer
v0.0.4
Published
Downloads
4
Maintainers
Readme
YouPlayer
YouPlayer is perfect Youtube Player wrapper. Every link that make user go straight to youtube is disable. so, user always stay on your website to watch exclusive content.
1. Installation
npm i youplayer
2. Import Project
import YouPlayer from "youplayer"
import "youplayer/dist/style.css"
3. CDN Installation
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/youplayer/dist/style.css">
<script src="https://cdn.jsdelivr.net/npm/youplayer"></script>
4. Usage
<div id="video"></div>
<script>
const app = YouPlayer({
el : "#video",
videoId : "_7EwGJmjT5E"
})
</script>
4. Methods
you can use method below to change player experience. usage example :
app.loadVideo("SkIk7txs1aY")
| method name | description | | ------------- |:-------------:| | loadVideo(videoId : string) | to change video on existing player | | playVideo() | to play video | | pauseVideo() | to pause video | | stopVideo() | to stop video |
5. Demo Live Demo
Thank You
This library built using vite, tailwind css and svelte
.