From 5428c47beac460a2fee7a2807c5299b2cbd5313e Mon Sep 17 00:00:00 2001 From: Eric Hartzog Date: Sun, 21 May 2017 13:59:16 -0400 Subject: [PATCH] Allow custom privacy settings --- index.html | 10 ++++------ vimeo-upload.js | 3 ++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 20b53dc..d647ccf 100644 --- a/index.html +++ b/index.html @@ -172,14 +172,12 @@
-
- +
+
@@ -226,7 +224,7 @@ ;(new VimeoUpload({ name: document.getElementById('videoName').value, description: document.getElementById('videoDescription').value, - private: document.getElementById('make_private').checked, + privacy: document.getElementById('videoPrivacy').value, file: files[0], token: document.getElementById('accessToken').value, upgrade_to_1080: document.getElementById('upgrade_to_1080').checked, diff --git a/vimeo-upload.js b/vimeo-upload.js index 042e045..cb1a269 100644 --- a/vimeo-upload.js +++ b/vimeo-upload.js @@ -109,6 +109,7 @@ api_url: 'https://api.vimeo.com', name: 'Default name', description: 'Default description', + privacy: 'anybody', contentType: 'application/octet-stream', token: null, file: {}, @@ -161,7 +162,7 @@ this.videoData = { name: (opts.name > '') ? opts.name : defaults.name, description: (opts.description > '') ? opts.description : defaults.description, - 'privacy.view': opts.private ? 'nobody' : 'anybody' + 'privacy.view': (opts.privacy > '') ? opts.privacy : defaults.privacy } if (!(this.url = opts.url)) {