How to open video picker view or gallery in ionic?
Asked Answered
M

1

7

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?

Montherlant answered 12/10, 2015 at 10:36 Comment(0)
O
9

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( ...
On answered 19/10, 2015 at 18:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.