Skip to content

Commit

Permalink
Auto Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfriedmann committed Aug 31, 2020
1 parent b385d8b commit 3244536
Show file tree
Hide file tree
Showing 18 changed files with 2,656 additions and 2,360 deletions.
1,241 changes: 645 additions & 596 deletions README.md

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions demos/video_download.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ var ZiggeoSdk = new Ziggeo(app_token, private_key);
// you can find example of grants JSON at https://ziggeo.com/docs/api/authorization-tokens/examples
ZiggeoSdk.Videos.get (video_token, {
success: function (video) {
console.log(video);
downloadVideo(video);
}
});
function downloadVideo(video){
ZiggeoSdk.Streams.download_video(video.token, video.default_stream.token, function(data){
fs.writeFile(video.token+'.'+video.default_stream.video_type, data, function(err){
console.log('downloaded\n');
});
ZiggeoSdk.Videos.download_video(video.token, {
success: function (data) {
fs.writeFileSync(video.token + '.mp4', Buffer.from(data, "binary"));
}
});
}
207 changes: 165 additions & 42 deletions dist/ziggeo.js

Large diffs are not rendered by default.

Loading

0 comments on commit 3244536

Please sign in to comment.