Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

v-video-embed

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v-video-embed

This is a component for Vue.js to utilize YouTube, Vimeo, DailyMotion, Coub iframe embed API easily.

  • 1.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
717
increased by6.22%
Maintainers
1
Weekly downloads
 
Created
Source

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

Vue Video Embed

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>

import Vue from 'vue'
import Embed from 'v-video-embed'

// global register
Vue.use(Embed);

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 -->
 <video-embed css="embed-responsive-21by9" src="https://www.youtube.com/watch?v=s4ObxcdXoFE"></video-embed>

 <!-- 16:9 aspect ratio: default -->
 <video-embed css="embed-responsive-16by9" src="https://www.youtube.com/watch?v=s4ObxcdXoFE"></video-embed>

 <!-- 4:3 aspect ratio -->
 <video-embed css="embed-responsive-4by3" src="https://www.youtube.com/watch?v=s4ObxcdXoFE"></video-embed>

 <!-- 1:1 aspect ratio -->
 <video-embed css="embed-responsive-1by1" src="https://www.youtube.com/watch?v=s4ObxcdXoFE"></video-embed>


<video-embed ref="youtube" src="https://www.youtube.com/watch?v=s4ObxcdXoFE"></video-embed>

<button class="btn btn-primary" v-on:click="change">Change Url</button>


<script>


    export default {

        methods: {

            change() {

                this.$refs.youtube.src = "https://www.youtube.com/watch?v=nqwQpXoSN7Q";

            }
        }

    }
</script>

Keywords

FAQs

Package last updated on 11 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc