Using ionic-native media capture to open camera and record videos I'd like the length of the videos to be a max of 120 seconds. Below are the pieces of code I'm using, I put a maxLength =120
but the camera will always record 60 seconds only and prompt and alert that max length was achieved, at 60 seconds. I don't receive any error and the camera records just fine, except I can't get the record length to be 120 secs. How could I achieve this? I'm using this on a iPad device
import { MediaCapture, MediaFile, CaptureError } from '@ionic-native/media-capture';
export class Recorder implements OnInit {
private maxLength = 120; // maximum video length (seconds)
constructor () {}
}
recordVideo(): Promise<any> {
return this.mediaCapture.captureVideo({duration: this.maxLength, limit: 1})
.catch((err: CaptureError) => { console.error(err); return err; })
.then((data: MediaFile[]) => this.submitVideo(data[0]))
}