recorded video from camera to upload on server

You must Login before you can answer or comment on any questions.

I am facing while uploading a video after i record it on my android phone. video is not uploading and its object is not found . i am using android SDK 2.2 and Titanium SDK 1.6.2. Here is my Code for recording and uploading:-

````````````````````````````````````````

var videoUri = null;

var b ; recordButton.addEventListener('click', function() {

var intent = Titanium.Android.createIntent({ action: 'android.media.action.VIDEO_CAPTURE' });
Titanium.Android.currentActivity.startActivityForResult(intent, function(e) {
    if (e.error) {
        Ti.UI.createNotification({
            duration: Ti.UI.NOTIFICATION_DURATION_LONG,
            message: 'Error: ' + e.error
        }).show();
    } else {
        if (e.resultCode === Titanium.Android.RESULT_OK) {
            videoUri = e.intent.data;


           btnCancelNormal.visible = true;
           lblsignUp.visible = true;
           btnContinueHover.visible = true;
       } else {
            Ti.UI.createNotification({
                duration: Ti.UI.NOTIFICATION_DURATION_LONG,
                message: 'Canceled/Error? Result code: ' + e.resultCode
            }).show();
        }
    }
});

});

//////""eee is name of alert box//////

                if(eee.index == 0)
                {
                     var source = Ti.Filesystem.getFile(videoUri); 
                                 b = source.read();
                    var portfolioWindow = Titanium.UI.createWindow({
                        url:'progress.js',
                        id:win.id,
                        titleWork:txtTitle.value,                                   imageObject:b

                    }); 
                    portfolioWindow.open({fullscreen: true });                      
                    //Titanium.UI.currentTab.open(portfolioWindow,{animated:true});                         
               }

````````````````````````````````````````

— asked 2 years ago by PANKAJ KUMAR
3 Comments
  • Why two nick names? Why two identical questions? Why is sky blue? :)

    Come on, you really think someone will answer to spam questions?

    — commented 2 years ago by Ivan Škugor

  • guys use the code formatting

    var videoUri = null;
     
    var b ; recordButton.addEventListener('click', function() {
    var intent = Titanium.Android.createIntent({ action: 'android.media.action.VIDEO_CAPTURE' });
    Titanium.Android.currentActivity.startActivityForResult(intent, function(e) {
        if (e.error) {
            Ti.UI.createNotification({
                duration: Ti.UI.NOTIFICATION_DURATION_LONG,
                message: 'Error: ' + e.error
            }).show();
        } else {
            if (e.resultCode === Titanium.Android.RESULT_OK) {
                videoUri = e.intent.data;
     
     
               btnCancelNormal.visible = true;
               lblsignUp.visible = true;
               btnContinueHover.visible = true;
           } else {
                Ti.UI.createNotification({
                    duration: Ti.UI.NOTIFICATION_DURATION_LONG,
                    message: 'Canceled/Error? Result code: ' + e.resultCode
                }).show();
            }
        }
    });
     
    });
    //////""eee is name of alert box//////
     
                    if(eee.index == 0)
                    {
                         var source = Ti.Filesystem.getFile(videoUri); 
                                     b = source.read();
                        var portfolioWindow = Titanium.UI.createWindow({
                            url:'progress.js',
                            id:win.id,
                            titleWork:txtTitle.value,                                   imageObject:b
     
                        }); 
                        portfolioWindow.open({fullscreen: true });                      
                        //Titanium.UI.currentTab.open(portfolioWindow,{animated:true});                         
                   }

    — commented 2 years ago by Nikunj S

  • Sorry next time we will use code formatting. Please answer the question.

    — commented 2 years ago by PANKAJ KUMAR

1 Answer

Sorry both the accounts are different we are two people working on it so by mistake we just put the same question from our different account. Please answer our question. its not fake and not a spam.

Your Answer

Think you can help? Login to answer this question!