vue-youtube
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -0,0 +0,0 @@ /*! |
@@ -0,0 +0,0 @@ /*! |
@@ -0,0 +0,0 @@ /*! |
{ | ||
"name": "vue-youtube", | ||
"version": "1.2.1", | ||
"description": "A Vue.js Plugin", | ||
"version": "1.2.2", | ||
"description": "YouTube IFrame Player API wrapper", | ||
"author": "Antério Vieira", | ||
@@ -11,2 +11,9 @@ "main": "dist/vue-youtube.common.js", | ||
"style": "dist/vue-youtube.css", | ||
"keywords": [ | ||
"vue.js", | ||
"youtube", | ||
"player", | ||
"api", | ||
"plugin" | ||
], | ||
"files": [ | ||
@@ -135,6 +142,3 @@ "dist", | ||
"homepage": "https://github.com/anteriovieira/vue-youtube#readme", | ||
"license": { | ||
"type": "MIT", | ||
"url": "http://www.opensource.org/licenses/mit-license.php" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
@@ -141,0 +145,0 @@ "get-youtube-id": "^1.0.0", |
@@ -11,4 +11,25 @@ # VueYoutube | ||
A simple component for a powerful API. [vue-youtube](https://www.npmjs.com/package/vue-youtube) provides a simple layer for you to use your imagination while over the [YouTube IFrame Player API](https://developers.google.com/youtube/iframe_api_reference). | ||
[vue-youtube](https://www.npmjs.com/package/vue-youtube) is an wrapper of [YouTube IFrame Player API](https://developers.google.com/youtube/iframe_api_reference) (YIPA). | ||
__What is the difference between other plugins?__ The difference is that the function body is wrapped in a promise. This promise is resolved only when the player has finished loading and is ready to begin receiving API calls (onReady). Therefore, all function calls are queued and replayed only when player is ready. | ||
You can do something like: | ||
```js | ||
export default { | ||
// ... | ||
computed: { | ||
player () { | ||
return this.$refs.youtube.player | ||
} | ||
}, | ||
methods: { | ||
async playVideo() { | ||
await this.player.playVideo() | ||
// Do something after the playVideo command | ||
} | ||
} | ||
} | ||
``` | ||
## Installation | ||
@@ -95,2 +116,4 @@ | ||
[Live demo](http://vue-youtube.herokuapp.com/) | ||
### Events | ||
@@ -97,0 +120,0 @@ |
@@ -0,0 +0,0 @@ const player = require('youtube-player') |
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
27001
175