How to get Video duration

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

How can I get the Video duration of video selected from gallery...?

========

Thanks

— asked 12 months ago by Ramkumar Murugadoss
1 Comment
  • I am struggling on how to select the Video from gallery. I have used the code for video selection

    Titanium.Media.openPhotoGallery({

            success : function(event) {
                Ti.API.debug('Our type was: ' + event.mediaType);
                if (event.mediaType == Titanium.Media.MEDIA_TYPE_VIDEO) {
                    UploadVideoToServer(event.media);
                }
                else{
                    alert("Please select video file");
                }
            },
            cancel : function(e) {
                alert(e);
            },
            error : function(err) {
                Ti.API.error(err);
            },
            mediaTypes : [Titanium.Media.MEDIA_TYPE_VIDEO]
    
        });
    

    but i only see the photo in the gallery. No videos are displayed in the gallery.

    Thanks in advance...

    — commented 2 months ago by kabindra simkhada

1 Answer

Your Answer

Think you can help? Login to answer this question!