This file contains hidden or 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
{ | |
"moderated": false, | |
"time": 1343204804.7934966, | |
"assets": [{ // Array of data on selected assets | |
"id": 14006623, | |
"shortcut": "WLLhdwzi", | |
"status": "complete", | |
"url": "http://media.getchute.com/media/WLLhdwzi", | |
"thumb_url": "http://photos-e.ak.fbcdn.net/hphotos-ak-ash4/320430_3084192643214_466525836_s.jpg", | |
"is_portrait": true, |
This file contains hidden or 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
Chute.MediaChooser.setDefaults({ | |
mediaTypes: 'all' | |
}); |
This file contains hidden or 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
Chute.MediaChooser.choose({ | |
embed: '#place-for-chooser' // selector for a target element | |
}, function(urls, data){ | |
}); |
This file contains hidden or 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
Chute.MediaChooser.choose({ | |
services: ['upload', 'facebook'] // specify array of services | |
}, function(urls, data){ | |
}); |
This file contains hidden or 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
Chute.MediaChooser.choose({ | |
css: 'http://website.com/path/to/stylesheet.css' | |
}, function(urls, data){ | |
}); |
This file contains hidden or 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
Chute.MediaChooser.choose({ | |
constraints: { | |
width: '> 200 && < 500' // images with width bigger than 200 and less than 500 are allowed | |
} | |
}, function(urls, data){ | |
}); |
This file contains hidden or 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
Chute.MediaChooser.choose({ | |
mediaTypes: 'images' // all | images (video coming soon!) | |
}, function(urls, data){ | |
}); |
This file contains hidden or 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
Chute.MediaChooser.choose({ | |
limit: 5 // allow 5 files maximum | |
}, function(urls, data){ | |
}); |
This file contains hidden or 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
var url = 'http://media.getchute.com/media/5aAxfa' // sample url returned from the Media Chooser | |
// Fill a 500x300 rectangle | |
Chute.fill(500, 300, url); // => http://media.getchute.com/media/5aAxfa/500x300 | |
// Fit into 500x300 rectangle | |
Chute.fit(500, 300, url); // => http://media.getchute.com/media/5aAxfa/fit/500x300 | |
// Max width of 500px | |
Chute.width(500, url); // => http://media.getchute.com/media/5aAxfa/w/500 |
This file contains hidden or 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
Chute.setApp('APPLICATION_ID'); |