Update lib/windows8/plugin/windows8/CaptureProxy.js

Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/b50f1ae6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/b50f1ae6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/b50f1ae6

Branch: refs/heads/master
Commit: b50f1ae6bdc43c1b0432ba07558534ac3274110c
Parents: 2a062a7
Author: wangmingfeng <mingfengwan...@gmail.com>
Authored: Tue Aug 28 15:52:28 2012 +0800
Committer: wangmingfeng <mingfengwan...@gmail.com>
Committed: Tue Aug 28 15:52:28 2012 +0800

----------------------------------------------------------------------
 lib/windows8/plugin/windows8/CaptureProxy.js |   32 ---------------------
 1 files changed, 0 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/b50f1ae6/lib/windows8/plugin/windows8/CaptureProxy.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/CaptureProxy.js 
b/lib/windows8/plugin/windows8/CaptureProxy.js
index e795ce9..e768b37 100644
--- a/lib/windows8/plugin/windows8/CaptureProxy.js
+++ b/lib/windows8/plugin/windows8/CaptureProxy.js
@@ -98,37 +98,5 @@ module.exports = {
             });
         }, function () { errorCallback(new 
CaptureError(CaptureError.CAPTURE_NO_MEDIA_FILES)); })
     
-    },
-    
-    getFormatData:function (successCallback, errorCallback, args) {
-        var contentType = args[1];
-        
Windows.Storage.StorageFile.getFileFromPathAsync(args[0]).then(function 
(storageFile) {
-                var mediaTypeFlag = 
String(contentType).split("/")[0].toLowerCase();
-                if (mediaTypeFlag === "audio") {
-                    
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));
-                    })
-                }
-                else if (mediaTypeFlag === "video") {
-                    
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));
-                    })
-                }
-                else if (mediaTypeFlag === "image") {
-                    
storageFile.properties.getImagePropertiesAsync().then(function 
(imageProperties) {
-                        successCallback(new MediaFileData(null, 0, 
imageProperties.height, imageProperties.width, 0));
-                    }, function () {
-                        errorCallback(new 
CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
-                    })
-                }
-                else { errorCallback(new 
CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT)) }
-            }, function () {
-                errorCallback(new 
CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
-            }
-        )
     }
 }    

Reply via email to