Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open video picker view or gallery in ionic?

Currently I can open image picker using $cordovaImagePicker, but also I want to open video picker for picking the video from gallery/ video gallery.

How can I achieve above task/ thing?

Currently there is no any plugin for picking videos. And html input type=file is open the Mobile Gallery but it's not provide the file path. Is there another way for this?

like image 983
RahulSalvikar Avatar asked Oct 12 '15 10:10

RahulSalvikar


1 Answers

You can use the Camera plugin org.apache.cordova.camera and use the following options for select a video from the gallery (Tested in Android):

    var options = {
    quality: 50,
    destinationType: Camera.DestinationType.FILE_URI,
    sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
    mediaType:Camera.MediaType.VIDEO
  };

  $cordovaCamera.getPicture(options).then( ...
like image 126
JoxieMedina Avatar answered Oct 03 '22 18:10

JoxieMedina