Skip to content

Commit

Permalink
Update home page layout, add changelog to readme etc
Browse files Browse the repository at this point in the history
  • Loading branch information
websemantics committed Feb 25, 2016
1 parent 66a4391 commit 68c1e0a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 23 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Vimeo Upload

```
_ ___ __ __ __ __
| | / (_)_ _ ___ ___ / / / /__ / /__ ___ ____/ /
| |/ / / ' \/ -_) _ \ / /_/ / _ \/ / _ \/ _ `/ _ /
|___/_/_/_/_/\__/\___/ \____/ .__/_/\___/\_,_/\_,_/
/_/ v1.1
Updated: 25 Feb 2016
```

Helper code for uploading video files directly with vanilla Javascript (XHR/CORS) to your Vimeo account.

Try the [live version](http://websemantics.github.io/vimeo-upload/)
Expand All @@ -25,11 +34,24 @@ See `upload.js` for additional parameters you can include when initializing the

This code has only been tested for uploading videos and monitoring progress.

# Change Log
All notable changes to this project will be documented in this section.

## [1.1] - 2016-02-25
### Changed
- Update video data after upload (name & description)
- Adding data chunking support for Cordova

### [1.0] - 2015-01-14
#### Changed
- Upload videos
- Support for high-definition videos

## ToDo

Implement Pause / Resume

## Open Source Projects Used

- [cors-upload-sample](https://github.com/googledrive/cors-upload-sample)
- Sample code for uploading files directly with XHR/CORS: [cors-upload-sample](https://github.com/googledrive/cors-upload-sample)

43 changes: 21 additions & 22 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,22 @@ <h1><img src="img/icon.png" style="width:50px"></img>&nbsp;Vimeo Upload</h1>
<a class="github-button" href="https://github.com/websemantcis" data-style="mega" data-count-href="/websemantcis/followers" data-count-api="/users/websemantcis#followers" data-count-aria-label="# followers on GitHub" aria-label="Follow @websemantcis on GitHub">Follow @websemantcis</a>

</div>
<p class="lead">Fill in your vimeo access token and drag you video file into the area below to upload to your vimeo account.</p>
<p class="lead">Fill in your vimeo access token, name and description then drag your video file into the dotted area below to upload to your vimeo account.</p>
<div>
<input type="accessToken" id="accessToken" class="form-control" placeholder="Vimeo access token" required autofocus></input>
<div class="checkbox">
<label>
<input type="checkbox" id="upgrade_to_1080" name="upgrade_to_1080"> Upgrade to 1080 </input>
</label>
</div>
<p id="video-data">Video Data</p>
<div class="form-group">
<input type="text" name="name" id="videoName" class="form-control" placeholder="Name" value="default name"></input>
</div>
<div class="form-group">
<input type="text" name="description" id="videoDescription" class="form-control" placeholder="Description" value = "default description"></input>
</div>
<div class="form-group">
<input type="accessToken" id="accessToken" class="form-control" placeholder="Vimeo access token" required autofocus></input>
</div>
<div class="form-group">
<input type="text" name="name" id="videoName" class="form-control" placeholder="Video name" value=""></input>
</div>
<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>
</div>
<br>
<div class="progress">
Expand All @@ -107,11 +108,6 @@ <h1><img src="img/icon.png" style="width:50px"></img>&nbsp;Vimeo Upload</h1>

<script src="upload.js"></script>
<script type="text/javascript">
videoData = {
name: 'Default Name',
description: 'Default Description'
};

/**
* Called when files are dropped on to the drop target. For each file,
* uploads the content to Drive & displays the results when complete.
Expand All @@ -124,8 +120,8 @@ <h1><img src="img/icon.png" style="width:50px"></img>&nbsp;Vimeo Upload</h1>
var upgrade_to_1080 = document.getElementById("upgrade_to_1080").checked;

// Set Video Data
videoData.name = document.getElementById("videoName").value;
videoData.description = document.getElementById("videoDescription").value;
var videoName = document.getElementById("videoName").value;
var videoDescription = document.getElementById("videoDescription").value;

// Clear the results div
var node = document.getElementById('results');
Expand All @@ -138,7 +134,10 @@ <h1><img src="img/icon.png" style="width:50px"></img>&nbsp;Vimeo Upload</h1>
file: files[0],
token: accessToken,
upgrade_to_1080: upgrade_to_1080,
videoData: videoData,
videoData: {
name: (videoName > '') ? videoName : 'Default name',
description: (videoDescription > '') ? videoDescription : 'Default description'
},
onError: function(data) {

var errorResponse = JSON.parse(data);
Expand Down

0 comments on commit 68c1e0a

Please sign in to comment.