vue-youtube
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "vue-youtube", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A Vue.js Plugin", | ||
@@ -5,0 +5,0 @@ "author": "Antério Vieira <anteriovieira@gmail.com>>", |
@@ -54,3 +54,3 @@ import uniqid from 'uniqid' | ||
playerStateChange (e) { | ||
if (e.data !== state.UNSTARTED) { | ||
if (e.data && e.data !== state.UNSTARTED) { | ||
this.$emit(this.events[this.data], e.target) | ||
@@ -57,0 +57,0 @@ } |
import Youtube from './components/Youtube.js' | ||
function plugin (Vue, options = {}) { | ||
let tag = document.createElement('script') | ||
tag.src = 'https://www.youtube.com/iframe_api' | ||
let firstScriptTag = document.getElementsByTagName('script')[0] | ||
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag) | ||
console.log(tag) | ||
window.onYouTubeIframeAPIReady = function () { | ||
//Vue.component('Youtube', Youtube) | ||
Vue.nextTick() | ||
} | ||
Vue.component('Youtube', Youtube) | ||
} | ||
@@ -18,0 +6,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44192
1007