From 33a4b14fbabebc02c2d30bb8f1ecb4f1e15111aa Mon Sep 17 00:00:00 2001 From: Kristian Kvarnsbacke Date: Tue, 14 Jan 2020 09:58:55 +0100 Subject: [PATCH] fix: Added support for supplying vimeoUrl which will instantiate the player with url instead of id. Useful if video is protected by private link. (#29) --- README.md | 7 +++++++ src/main.js | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index ef786ff..31b115f 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,13 @@ Another option is to use the [no-ssr](https://nuxtjs.org/api/components-no-ssr/) Vimeo player unique identifier Yes + + video-url + String + undefined + Vimeo url to play video (if using private links) + No + loop Boolean diff --git a/src/main.js b/src/main.js index b041079..a3346c8 100644 --- a/src/main.js +++ b/src/main.js @@ -38,6 +38,9 @@ export default { videoId: { required: true }, + videoUrl: { + default: undefined + }, loop: { default: false }, @@ -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))