Steps to Reproduce
Hi there, I am developing an mobile application for Android and iOS using appcelerator titanium alloy framework, code for the capture Video button is as follows:
//+++++++++++++++++++++++++++++++++++++++++ $.captureVidBtn.addEventListener('click',function(e){ Ti.Media.showCamera({ success: function(event){ //// Ti.Media.saveToPhotoGallery(event.media); var sendit = Titanium.Network.createHTTPClient({ onerror:function(e){ //TI.API.debug(e.error); alert('There was an error durring connectiing with server...'); }, onload:function(e){ //TI.API.info('Received text: ' + this.responseText); response = this.responseText; alert(response);
}
});
sendit.open("POST",WEB_SERVICE_URL);
var uploadParams = ({"mobile_form_action":"upload_video","media":event.media,});
sendit.send(uploadParams);
////
},
animated:true,
autoHide:true,
saveToPhotoGallery:true,
showControls:true,
allowEditing:true,
mediaTypes:[Ti.Media.MEDIA_TYPE_VIDEO,Ti.Media.MEDIA_TYPE_PHOTO],
videoQuality:Ti.Media.QUALITY_640x480,
}); });
//+++++++++++++++++++++++++++++++++++++++++
when I execute the application, the camera appears but it can take pictures only , the video mode is disabled :(,
Coding Environment: >> Macbook Pro, >> Titanium Studio 3.2.x >> Checking on Android Samsung Galaxy Young Device connected to mac machine
Please help
Thanks
Actual Result
Video button in start seems to be enabled but later it disabled
Expected Result
video and photo both should be able to get uploaded only photo is getting uploaded not video, we cannot even record the video
Please provide a simple but complete test case that we can run as it is to reproduce this issue.
Here is the test case:- There is a button with id: ALLOY XML: =============================== ALLOY JS CODE FOR THE BUTTON: ================================= $.browseVidBtn.addEventListener('click',function(e){ Titanium.Media.openPhotoGallery({ success: function(event){ //// //Titanium.Media.saveToPhotoGallery(event.media); var sendit = Titanium.Network.createHTTPClient({ onerror:function(e){ //TI.API.debug(e.error); alert("There was an error durring connectiing with server..."); }, onload:function(e){ //TI.API.info("Received text: " + this.responseText); response = this.responseText; alert(response); } }); sendit.open("POST",WEB_SERVICE_URL); //URL where the file has to be posted var uploadParams = ({"vTitle":vTitle,"vDesc":vDesc,"vTag":vTag,"mobile_form_action":"upload_video","media":event.media,}); sendit.send(uploadParams); //// }, autoHide:true, videoQuality:Titanium.Media.QUALITY_HIGH, mediaTypes:[Titanium.Media.MEDIA_TYPE_VIDEO,Titanium.Media.MEDIA_TYPE_PHOTO,], }); }); ISSUE:- ============================= ISSUE is that when the button is clicked camera is appearing but I can only capture the image, I cannot take the video. can you please tell me whats the issue , I got the code from appcelerator online help documentation. Kindly let me know whats wrong in the code?? is there something i have to write additional oir I had writen something wrong? let me know please
any luck???
Have you tried the kitchen sink application that comes with studio? If not, you can download it from studio. Run the kitchen sink app, go to Phone ==> Camera ==> Video record. The video works perfectly fine. Please let me know if you are looking for something else.
Resolving this ticket as we have not been able to reproduce this issue as we have not received any further information from the reporter.