Created
November 18, 2011 14:48
-
-
Save donayama/1376645 to your computer and use it in GitHub Desktop.
cameraでtabを押すと...
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
Ti.Media.showCamera({ | |
success : function(event) { | |
alert('Your photo was saved to the Photo Gallery'); | |
}, | |
cancel : function() { | |
}, | |
error : function(error) { | |
var message; | |
if (error.code == Ti.Media.NO_CAMERA) { | |
message = 'Device does not have video recording capabilities'; | |
} else { | |
message = 'Unexpected error: ' + error.code; | |
} | |
Ti.UI.createAlertDialog({ | |
title : 'Camera', | |
message : message | |
}).show(); | |
}, | |
saveToPhotoGallery : true, | |
allowEditing : true, | |
mediaTypes : [Ti.Media.MEDIA_TYPE_VIDEO,Ti.Media.MEDIA_TYPE_PHOTO] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment