Example #1
0
		videoPlayer.requestThumbnailImagesAtTimes([0], Titanium.Media.VIDEO_TIME_OPTION_NEAREST_KEYFRAME, function(response){
			Ti.API.info("Thumbnail: "+ JSON.stringify(response));
			croppedThumbnail = utils.resizeAndCropFromBlob({
		        blob : response.image,
		        width : 500,
		        height : 250
		    });
		    $.ugcVideoPreview.setTop("10dp");
    		$.ugcVideoPreview.setImage(croppedThumbnail);
    		$.ugcVideoPreview.setWidth(Ti.UI.SIZE);
    		$.ugcVideoPreview.setHeight(Ti.UI.SIZE);
		});	
Example #2
0
/**
 * Shows the captured photo
 * @param {Object} blob Photo as blob
 */
function showPicture(blob) {
	$.ugcImage.localfilePath = blob.nativePath;
	var blob = utils.resizeAndCropFromBlob({
        blob : blob,
        width : 500,
        height : 250
    });
    $.ugcImage.setTop("10dp");
    $.ugcImage.setImage(blob);
    $.ugcImage.setWidth(Ti.UI.SIZE);
    $.ugcImage.setHeight(Ti.UI.SIZE);
    $.ugcImageWrapper.setWidth(Ti.UI.FILL);
    $.ugcImageWrapper.setHeight(Ti.UI.SIZE);
}