How to use the cordova-plugin-media-capture.MediaFile function in cordova-plugin-media-capture

To help you get started, we’ve selected a few cordova-plugin-media-capture examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / cordova-plugin-media-capture / src / browser / CaptureProxy.js View on Github external
file.getMetadata(function (meta) {
                                mediaFiles.push(new MediaFile(file.name, file.toURL(), 'image/jpeg', meta.modificationTime, meta.size));
                                // Check if we're done with capture. If so, then call a successCallback
                                if (imagesTaken >= limit) {
                                    successCallback(mediaFiles);
                                }
                            }, fail);
                        };
github apache / cordova-plugin-media-capture / src / windows / CaptureProxy.js View on Github external
photoFile.getBasicPropertiesAsync().done(function (basicProperties) {
                    var result = new MediaFile(photoFile.name, 'ms-appdata:///local/' + photoFile.name, photoFile.contentType, basicProperties.dateModified, basicProperties.size);
                    result.fullPath = photoFile.path;
                    successCallback([result]);
                }, function (err) {
                    fail(CaptureError.CAPTURE_INTERNAL_ERR, err);