Skip to content

Commit 096f95d

Browse files
committed
Add README
1 parent 19ee8e3 commit 096f95d

File tree

3 files changed

+77
-57
lines changed

3 files changed

+77
-57
lines changed

README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# vue-youtube-iframe
2+
3+
This plugin makes it easy to integrate the YouTube Iframe API into your Vue app. This plugin is Vue V3 compatible.
4+
5+
## Usage
6+
7+
### Installation
8+
9+
```shell
10+
npm install vue-youtube-iframe --save
11+
```
12+
13+
or
14+
15+
```shell
16+
yarn add vue-youtube-iframe
17+
```
18+
19+
### Basic usage
20+
21+
`main.js`
22+
23+
```js
24+
import { createApp } from 'vue';
25+
import App from './App.vue';
26+
27+
import VueYouTubeIframe from 'vue-youtube-iframe';
28+
29+
createApp(App).use(VueYouTubeIframe).mount('#app');
30+
```
31+
32+
`YourComponent.vue`
33+
34+
```vue
35+
<template>
36+
<youtube-iframe :video-id="YT_VIDEO_ID"></youtube-iframe>
37+
</template>
38+
```
39+
40+
### Advanced usage
41+
42+
`YourComponent.vue`
43+
44+
```vue
45+
<template>
46+
<youtube-iframe
47+
:video-id="YT_VIDEO_ID"
48+
:player-width="WIDTH"
49+
:player-height="HEIGHT"
50+
:player-parameters="YT_PLAYER_PARAMS"
51+
@EVENT="CALLBACK"
52+
></youtube-iframe>
53+
</template>
54+
```
55+
56+
#### Available player parameters
57+
58+
For the available player parameters see [here](https://developers.google.com/youtube/player_parameters#Parameters)
59+
60+
#### Available Events
61+
62+
```
63+
@ready, @error, @ended, @playing, @paused, @buffering and @cued
64+
```
65+
66+
For detailed event information check [here](https://developers.google.com/youtube/iframe_api_reference#Events)
67+
68+
## Contributing / Building
69+
70+
Contributions and pull request are welcome!
71+
72+
```shell
73+
cd vue-youtube-iframe
74+
yarn install / npm install
75+
yarn run build / npm run build
76+
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "vue-youtube-iframe",
2+
"name": "@techassi/vue-youtube-iframe",
33
"version": "1.0.0",
44
"description": "This plugin makes it easy to integrate the YouTube Iframe API into your Vue app. This plugin is Vue V3 compatible.",
55
"main": "lib/vue-youtube-iframe.umd.js",

src/player.vue

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)