Vue Video Embed component for Vue.js
This is a component for Vue.js to utilize YouTube, Vimeo, DailyMotion, Coub iframe embed API easily.
☞ Vue JS - The Complete Guide (incl. Vue Router & Vuex)
☞ How to Create a Chrome Extension with Vue.js
☞ How To Build a Blog with Nest.js, MongoDB, and Vue.js
Demo
Install
npm install v-video-embed
yarn install v-video-embed
Use CDN
<script src="https://unpkg.com/v-video-embed/dist/video-embed.min.js" type="text/javascript"></script>
// global registerVue;
Youtube
<video-embed src="https://www.youtube.com/watch?v=s4ObxcdXoFE"></video-embed> # custom params <video-embed :params="{autoplay: 1}" src="https://www.youtube.com/watch?v=s4ObxcdXoFE"></video-embed>
# vimeo<video-embed src="https://vimeo.com/370293725"></video-embed> # dailymotion<video-embed src="https://dai.ly/x7n7y06"></video-embed> # coub<video-embed src="https://coub.com/embed/22eztb"></video-embed>
<!-- 21:9 aspect ratio --> <!-- 16:9 aspect ratio: default --> <!-- 4:3 aspect ratio --> <!-- 1:1 aspect ratio -->
Change Url