Ionic 2 Native Camera - Limit duration of video capturing


#1

I am using Ionic 2 Native to capture video in my app, and I need to limit the duration of the video to a few seconds.

Is this possible using Ionic Native? if not, is it possible using other Cordova plugins?

Thanks


#2

Hi, still no answear? I will face this behavior soon :slight_smile:


#3

Hi,

Actually, I’ve found the answer :slight_smile:

You should use the Media Capture plugin instead of the Camera plugin: http://ionicframework.com/docs/native/media-capture/#CaptureVideoOptions

Example:
MediaCapture.captureVideo({ limit: 1, duration: 20 })…

Thanks to this guy: http://stackoverflow.com/questions/43307280/ionic-2-native-camera-limit-duration-of-video-capturing/43308302#43308302


#4

thanks a lot @bluzi :wink: