Reproduce Step:
Simply run the test case in a classic project.
Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({});
var button = Ti.UI.createButton({
top: 100,
left: 30,
title: "Show Camera",
});
button.addEventListener("click", function(){
Titanium.Media.showCamera({
success:function(event) {
// called when media returned from the camera
Ti.API.info('showCamera: ' + JSON.stringify(event));
if (event.mediaType == Ti.Media.MEDIA_TYPE_VIDEO) {
alert("Video saved");
}
},
cancel:function() {
alert("cancelled Camera!");
},
error:function(error) {
var a = Titanium.UI.createAlertDialog({title:'Camera'});
if (error.code == Titanium.Media.NO_CAMERA) {
a.setMessage('Please run this test on device');
} else {
a.setMessage('Unexpected error: ' + error.code);
}
a.show();
},
saveToPhotoGallery:true,
allowEditing : true,
mediaTypes : [Ti.Media.MEDIA_TYPE_VIDEO]
});
});
win.add(button);
win.open();
Expect Result:
Video should save into gallery, like a picture.
Actual Result:
Console log shows the camera saved. But can't find it in gallery.
Is this a regression? Did this used to work in a previous version.
Master PR: https://github.com/appcelerator/titanium_mobile/pull/6814 4_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/6815
Verified using: Mac OSX 10.10.3 Titanium SDK build: 4.0.0.v20150430090209 Appc CLI (NPM): 0.3.55 Appc CLI (Registry): 0.2.279 Using the attached code the video is now saved to the gallery as expected Closing ticket