description
Upload a video from the gallery in iPhone7 Simulator is not working but it works as expected with iPhone 7 device .
Testing Environment
Ti SDK version 5.5.1.GA
CLI 5.5.1
Simulator Version iPhone7 v10
Steps to reproduce
1. Just run this following code and try to select any video from the gallery, it get stuck on compressing page.
2. Test Code
var win = Titanium.UI.createWindow({
backgroundColor : 'white',
layout : "vertical"
});
// Create a Button.
var gallery = Ti.UI.createButton({
title : 'gallery',
height : Ti.UI.SIZE,
width : Ti.UI.SIZE,
top : 20
});
// Add to the parent view.
win.add(gallery);
function openGallery() {
Titanium.Media.openPhotoGallery({
success : function(event) {
alert(event.media);
},
cancel : function() {
// called when user cancels taking a picture
},
error : function(error) {
// called when there's an 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 and mediaTypes are iOS-only settings
//allowEditing : true,
mediaTypes : [Ti.Media.MEDIA_TYPE_VIDEO, Ti.Media.MEDIA_TYPE_PHOTO]
});
}
gallery.addEventListener('click', function() {
openGallery();
});
win.open();
Thanks
This issue is currently invalid in many cases: * You are talking about iOS 7 in the title but iPhone 7 in the description * You are talking about upload problems but don't specify any upload-related code that could reproduce it * It was tested on both iPhone 7 simulator and device and it works I only tested with master and 6.0.0 so far, but those should not differ from 5.5.1.GA in that functionality. Please update this ticket wth correct info, otherwise we will resolve it.
Resolving for now, since we cannot reproduce it in the iPhone 7 Simulator (tested with both 10.0 and 10.1). If there is a unique use-case (e.g. a specific video format or size), please provide that one along with a full screen recording of the behavior. But I think using the latest SDK should be fine in this case. Thx!
Closing ticket with reference to the previous comments.