Cordova windows phone应用程序摄像头方向错误

Cordova windows phone应用程序摄像头方向错误,cordova,camera,windows-phone-8.1,navigator,Cordova,Camera,Windows Phone 8.1,Navigator,我正在使用Cordova在visual studio 2015中为windows phone创建混合应用程序。 面对前摄像头时,我面临摄像头方向的问题 这是我的密码 if (!navigator.camera) { alert("Camera API not supported", "Error"); deffered.reject('Unable to open camera'); return deffered.prom

我正在使用Cordova在visual studio 2015中为windows phone创建混合应用程序。 面对前摄像头时,我面临摄像头方向的问题

这是我的密码

if (!navigator.camera) {
            alert("Camera API not supported", "Error");
            deffered.reject('Unable to open camera');
            return deffered.promise;
        };
        if( direction === undefined ) {
            direction = 0;
        }
        var options =   {   
            quality: 50,
            destinationType: Camera.DestinationType.FILE_URI,
            sourceType: 1,      // 0:Photo Library, 1=Camera, 2=Saved Album
            encodingType: 0,     // 0=JPG 1=PNG
            cameraDirection: direction // 0 for back, 1 for front
        };

        navigator.camera.getPicture(
            function( imgData ) {
              deffered.resolve(imgData);
            },
            function (message) {
                console.log(message);
              deffered.reject('Unable to open camera');
            },
            options);
        return deffered.promise;
    }
当相机打开时,方向将相反

它的形象正好相反 我试过了

cameraOrientation : 0 or 1 but it makes camera green screen only.

我找到了解决办法。 在CameraProxy.js中,更改方向旋转功能行号569

case Windows.Devices.Sensors.SimpleOrientation.notRotated:
            if (cameraDirection == 0) {
                return Windows.Media.Capture.VideoRotation.clockwise90Degrees;
            }
            else {
                return Windows.Media.Capture.VideoRotation.clockwise270Degrees;
            }