Easy to embed Youtube Embeds
youtube-player
creates a simple youtube embed player without any iframe attributes. Easy to embed from any URL.
npm install --save customelement-youtube
import "customelement-youtube"
<script src="build/youtube.js"></script>
<script src="build/youtube.es5.js"></script>
When customelement-youtube is loaded correctly, you can just use it like this:
<youtube-player url="https://www.youtube.com/watch?v=jJWPmYSbN5c" >
url
- YouTube Embed Urlstart-at="60"
- Start a youtube video at 60 secondsrecommendations
- Shows recommendations on pause or videoendhide-info
- Hide video informationhide-controls
- Hide player controlsextended-privacy
- Activate nocookies modeautoplay
- Autoplay the videoallow-fullscreen
- Allow the player to go fullscreen
This will need an update to find out what browsers are currently supporting all features
Feel free to send in Pull Requests. I'll take my time to look into them.