Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2667] showCamera does not capture video it captures image only

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-03-03T02:45:54.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterAmit Joshi
AssigneeRitu Agrawal
Created2014-02-22T20:55:22.000+0000
Updated2016-03-08T07:41:46.000+0000

Description

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

Attachments

FileDateSize
.log2014-02-22T20:56:40.000+00004105825
diagnostic7267377798820025427.log2014-02-22T20:56:52.000+000014202

Comments

  1. Ritu Agrawal 2014-02-24

    Please provide a simple but complete test case that we can run as it is to reproduce this issue.
  2. Amit Joshi 2014-02-24

    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
  3. Amit Joshi 2014-02-24

    any luck???
  4. Ritu Agrawal 2014-02-24

    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.
  5. Ritu Agrawal 2014-03-03

    Resolving this ticket as we have not been able to reproduce this issue as we have not received any further information from the reporter.

JSON Source