Skip to content

Commit

Permalink
fix: Added support for supplying vimeoUrl which will instantiate the …
Browse files Browse the repository at this point in the history
…player with url instead of id. Useful if video is protected by private link. (#29)
  • Loading branch information
kristianm authored and Dobromir Hristov committed Jan 14, 2020
1 parent bdceb12 commit 33a4b14
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ Another option is to use the [no-ssr](https://nuxtjs.org/api/components-no-ssr/)
<td>Vimeo player unique identifier</td>
<td>Yes</td>
</tr>
<tr>
<td>video-url</td>
<td>String</td>
<td>undefined</td>
<td>Vimeo url to play video (if using private links)</td>
<td>No</td>
</tr>
<tr>
<td>loop</td>
<td>Boolean</td>
Expand Down
4 changes: 4 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ export default {
videoId: {
required: true
},
videoUrl: {
default: undefined
},
loop: {
default: false
},
Expand Down Expand Up @@ -103,6 +106,7 @@ export default {
loop: this.loop,
autoplay: this.autoplay
}
if (this.videoUrl) { options.url = this.videoUrl }

this.player = new Player(this.elementId, assign(options, this.options))

Expand Down

0 comments on commit 33a4b14

Please sign in to comment.