VueYoutube
A simple component for a powerful API. vue-youtube provides a simple layer for you to use your imagination while over the YouTube IFrame Player API.
vue-youtube is an wrapper of YouTube IFrame Player API (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:
Installation
Usage
Bundler (Webpack, Rollup)
Browser
Example
or
Events
Event |
---|
ready |
ended |
playing |
paused |
buffering |
cued |
error |
Player
Example:
API
vm.$youtube.getIdFromUrl
New in v1.2.0
- Type:
Function
- Description: Parse a youtube url returning the video ID. (get-youtube-id)
- Arguments:
{String} url
{Object} options
- Usage: