Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function (videoProperties) {
successCallback(new MediaFileData(null, videoProperties.bitrate, videoProperties.height, videoProperties.width, videoProperties.duration / 1000));
}, function () {
errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
storageFile.properties.getImagePropertiesAsync().then(function (imageProperties) {
successCallback(new MediaFileData(null, 0, imageProperties.height, imageProperties.width, 0));
}, function () {
errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
function (imageProperties) {
successCallback(new MediaFileData(null, 0, imageProperties.height, imageProperties.width, 0));
}, function () {
errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
storageFile.properties.getVideoPropertiesAsync().then(function (videoProperties) {
successCallback(new MediaFileData(null, videoProperties.bitrate, videoProperties.height, videoProperties.width, videoProperties.duration / 1000));
}, function () {
errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
storageFile.properties.getMusicPropertiesAsync().then(function (audioProperties) {
successCallback(new MediaFileData(null, audioProperties.bitrate, 0, 0, audioProperties.duration / 1000));
}, function () {
errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
function (audioProperties) {
successCallback(new MediaFileData(null, audioProperties.bitrate, 0, 0, audioProperties.duration / 1000));
}, function () {
errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
img.onload = function () {
if (successCallback) {
successCallback(new MediaFileData(null, 0, img.height, img.width, 0));
}
};
}