Hello, I am currently developing Android App.
Any idea on how to limit the size of video while capturing an video? @mhartington
Hello, I am currently developing Android App.
Any idea on how to limit the size of video while capturing an video? @mhartington
Check out cordova’s media capture plugin
http://plugins.cordova.io/#/package/org.apache.cordova.media-capture
Specifically the part about CaptureVideoOptions.limit
But CaptureVideoOptions.limit doesnt restrict size of file. Is that correct? It only restricts number of clips.
Correct me if I am wrong.
Seems to be only the number of clips. Doesn’t look like it’s going to be possible to limit the recording by file size right out of the box. You may need to do some custom code and logic for that
Thank You. I thought same. Just confirming the same.
Also, one more question, I need to provide ability to user to select any video file in device.
For Pictures, we use the option Camera.PictureSourceType.PHOTOLIBRARY.
Like that, is there any option like this to populate only videos?
Thanks.
May be you can use regexp to match a pattern of video file extensions.
@siddhartha, you mean to write code to get list of video file and populate it?
If so, That is the only alternate way.
Before doing that Just like to know, is there any way to get all videos from gallery? Just how we populate all pictures from gallery using Camera.PictureSourceType.PHOTOLIBRARY.
@mhartington - any input on this please?
Thanks.
Not too sure to be honest. I’ve never used the plugin so I’m not really an authority on it. But @siddhartha’s suggestion sounds like it might be the best approach for now
Even I have never used the MediaCapture
plugin. I was just offering a suggestion. Do what suits you and your app the best.