Skip to content

Commit

Permalink
Allow custom privacy settings websemantics#17
Browse files Browse the repository at this point in the history
  • Loading branch information
Hydraner committed Jun 1, 2021
1 parent 6ad17d0 commit d500e52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 4 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,12 @@
<div class="form-group">
<input type="text" name="description" id="videoDescription" class="form-control" placeholder="Video description" value=""></input>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="upgrade_to_1080" name="upgrade_to_1080"> Upgrade to 1080 </input>
</label>
<div class="form-group">
<input type="text" name="privacy" id="videoPrivacy" class="form-control" value="anybody"></input>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="make_private" name="make_private"> Make Private </input>
<input type="checkbox" id="upgrade_to_1080" name="upgrade_to_1080"> Upgrade to 1080 </input>
</label>
</div>
</div>
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion vimeo-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
api_url: 'https://api.vimeo.com',
name: 'Default name',
description: 'Default description',
privacy: 'anybody',
contentType: 'application/octet-stream',
token: null,
file: {},
Expand Down Expand Up @@ -165,7 +166,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)) {
Expand Down

0 comments on commit d500e52

Please sign in to comment.