Created
April 27, 2018 22:38
-
-
Save Maharony/4ffe6a1551b9093c94a01d4de8ad2805 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
js | |
window.totalFramesFromVid = 100; | |
function widget(){ | |
window.cloudinary.openUploadWidget({ cloud_name: 'xxxxxxx', upload_preset: '3dImage', client_allowed_formats: ['mov','mp4','webm'], sources: ['local','camera']}, | |
function(error, result) { | |
if(!result)return; | |
//console.log(result) | |
window.result=result[0]; | |
window.vidLength = window.result.duration; | |
window.frameGap = (window.vidLength/window.totalFramesFromVid).toFixed(2); | |
window.viewportWidth = $(window).width(); | |
window.imageWidth = ''; | |
if (viewportWidth >= 800){window.imageWidth = 800} else if (viewportWidth < 800 && viewportWidth > 500){window.imageWidth = 600} else {window.imageWidth = 320}; | |
window.aspectRatio = window.result.width/window.result.height; | |
build(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment